-
Notifications
You must be signed in to change notification settings - Fork 333
/
Copy pathattributes.ts
64 lines (57 loc) · 2.89 KB
/
attributes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* @overview This file contains the custom attributes used in telemetry events.
* Attribute names exist in a global namespace, alongside metric names. Use this file to ensure that attribute names are unique.
*
* To define a new attribute follow these steps:
* 1. Make sure it's not a semantic attribute that's already been defined by {@link @opentelemetry/semantic-conventions | OpenTelemetry} (e.g. `service.name`)
* 2. Come up with a unique name for it so that it doesn't clash with other attributes or metrics.
* 3. Prefix the attribute name with `aztec` to make it clear that it's a custom attribute.
* 4. Add a description of what the attribute represents and examples of what it might contain.
* 5. Start using it.
*
* @note Attributes and metric names exist in a hierarchy of namespaces. If a name has been used as a namespace, then it can not be used as a name for an attribute or metric.
* @example If `aztec.circuit.name` has been defined as an attribute then `aztec.circuit` alone can not be re-used for a metric or attribute because it is already a namespace.
* @see {@link https://opentelemetry.io/docs/specs/semconv/general/attribute-naming/}
*/
/** The Aztec network identifier */
export const NETWORK_NAME = 'aztec.network_name';
/**
* The name of the protocol circuit being run (e.g. public-kernel-setup or base-rollup)
* @see {@link @aztec/circuit-types/stats:CircuitName}
*/
export const PROTOCOL_CIRCUIT_NAME = 'aztec.circuit.protocol_circuit_name';
/**
* The type of protocol circuit being run: server or client
*/
export const PROTOCOL_CIRCUIT_TYPE = 'aztec.circuit.protocol_circuit_type';
/**
* For an app circuit, the contract:function being run (e.g. Token:transfer)
*/
export const APP_CIRCUIT_NAME = 'aztec.circuit.app_circuit_name';
/**
* The type of app circuit being run: server or client
*/
export const APP_CIRCUIT_TYPE = 'aztec.circuit.app_circuit_type';
/** The block number */
export const BLOCK_NUMBER = 'aztec.block.number';
/** The parent's block number */
export const BLOCK_PARENT = 'aztec.block.parent';
/** How many txs are being processed to build this block */
export const BLOCK_CANDIDATE_TXS_COUNT = 'aztec.block.candidate_txs_count';
/** How many actual txs were included in this block */
export const BLOCK_TXS_COUNT = 'aztec.block.txs_count';
/** The block size (power of 2) */
export const BLOCK_SIZE = 'aztec.block.size';
/** The tx hash */
export const TX_HASH = 'aztec.tx.hash';
/** Generic attribute representing whether the action was successful or not */
export const OK = 'aztec.ok';
/** Generic status attribute */
export const STATUS = 'aztec.status';
/** The type of the transaction */
export const L1_TX_TYPE = 'aztec.l1.tx_type';
/** The phase of the transaction */
export const TX_PHASE_NAME = 'aztec.tx.phase_name';
/** The proving job type */
export const PROVING_JOB_TYPE = 'aztec.proving.job_type';
export const MERKLE_TREE_NAME = 'aztec.merkle_tree.name';