@aztec/telemetry-client 4.0.0-nightly.20260108 → 4.0.0-nightly.20260110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/metrics.ts CHANGED
@@ -5,278 +5,1317 @@
5
5
  *
6
6
  * @see {@link https://opentelemetry.io/docs/specs/semconv/general/metrics/ | OpenTelemetry Metrics} for naming conventions.
7
7
  */
8
+ import { ValueType } from '@opentelemetry/api';
8
9
 
9
- export const BLOB_SINK_STORE_REQUESTS = 'aztec.blob_sink.store_request_count';
10
- export const BLOB_SINK_RETRIEVE_REQUESTS = 'aztec.blob_sink.retrieve_request_count';
11
- export const BLOB_SINK_OBJECTS_IN_BLOB_STORE = 'aztec.blob_sink.objects_in_blob_store';
12
- export const BLOB_SINK_BLOB_SIZE = 'aztec.blob_sink.blob_size';
10
+ /**
11
+ * Defines the complete metadata for a metric.
12
+ * Co-locates name, description, unit, and value type in a single definition.
13
+ */
14
+ export interface MetricDefinition {
15
+ /** The metric name (e.g., 'aztec.sequencer.block.build_duration') */
16
+ readonly name: string;
17
+
18
+ /** Human-readable description of what this metric measures */
19
+ readonly description: string;
20
+
21
+ /**
22
+ * The unit of measurement.
23
+ * Common units: 'ms', 's', 'By', 'gas', 'mana', 'mana/s', 'gwei', 'eth', 'peers', 'requests', 'tx', 'blobs', 'blocks'
24
+ * @see https://opentelemetry.io/docs/specs/semconv/general/metrics/ for conventions
25
+ */
26
+ readonly unit?: string;
13
27
 
14
- export const BLOB_SINK_ARCHIVE_BLOB_REQUEST_COUNT = 'aztec.blob_sink.archive.block_request_count';
15
- export const BLOB_SINK_ARCHIVE_BLOCK_REQUEST_COUNT = 'aztec.blob_sink.archive.blob_request_count';
16
- export const BLOB_SINK_ARCHIVE_BLOB_COUNT = 'aztec.blob_sink.archive.blob_count';
28
+ /**
29
+ * The type of value reported.
30
+ * INT for counts/integers, DOUBLE for fractional values.
31
+ * @default ValueType.DOUBLE (OpenTelemetry default)
32
+ */
33
+ readonly valueType?: ValueType;
34
+ }
17
35
 
18
- /** How long it takes to simulate a circuit */
19
- export const CIRCUIT_SIMULATION_DURATION = 'aztec.circuit.simulation.duration';
20
- export const CIRCUIT_SIMULATION_INPUT_SIZE = 'aztec.circuit.simulation.input_size';
21
- export const CIRCUIT_SIMULATION_OUTPUT_SIZE = 'aztec.circuit.simulation.output_size';
36
+ export const BLOB_SINK_STORE_REQUESTS: MetricDefinition = {
37
+ name: 'aztec.blob_sink.store_request_count',
38
+ description: 'Number of blob store requests',
39
+ valueType: ValueType.INT,
40
+ };
41
+ export const BLOB_SINK_RETRIEVE_REQUESTS: MetricDefinition = {
42
+ name: 'aztec.blob_sink.retrieve_request_count',
43
+ description: 'Number of blob retrieve requests',
44
+ valueType: ValueType.INT,
45
+ };
46
+ export const BLOB_SINK_OBJECTS_IN_BLOB_STORE: MetricDefinition = {
47
+ name: 'aztec.blob_sink.objects_in_blob_store',
48
+ description: 'Number of objects in the blob store',
49
+ valueType: ValueType.INT,
50
+ };
51
+ export const BLOB_SINK_BLOB_SIZE: MetricDefinition = {
52
+ name: 'aztec.blob_sink.blob_size',
53
+ description: 'Size of blobs',
54
+ unit: 'By',
55
+ valueType: ValueType.INT,
56
+ };
22
57
 
23
- export const CIRCUIT_WITNESS_GEN_DURATION = 'aztec.circuit.witness_generation.duration';
24
- export const CIRCUIT_WITNESS_GEN_INPUT_SIZE = 'aztec.circuit.witness_generation.input_size';
25
- export const CIRCUIT_WITNESS_GEN_OUTPUT_SIZE = 'aztec.circuit.witness_generation.output_size';
58
+ export const BLOB_SINK_ARCHIVE_BLOB_REQUEST_COUNT: MetricDefinition = {
59
+ name: 'aztec.blob_sink.archive.block_request_count',
60
+ description: 'Number of archive blob requests',
61
+ valueType: ValueType.INT,
62
+ };
63
+ export const BLOB_SINK_ARCHIVE_BLOCK_REQUEST_COUNT: MetricDefinition = {
64
+ name: 'aztec.blob_sink.archive.blob_request_count',
65
+ description: 'Number of archive block requests',
66
+ valueType: ValueType.INT,
67
+ };
68
+ export const BLOB_SINK_ARCHIVE_BLOB_COUNT: MetricDefinition = {
69
+ name: 'aztec.blob_sink.archive.blob_count',
70
+ description: 'Number of blobs in archive',
71
+ valueType: ValueType.INT,
72
+ };
26
73
 
27
- export const CIRCUIT_PROVING_DURATION = 'aztec.circuit.proving.duration';
28
- export const CIRCUIT_PROVING_INPUT_SIZE = 'aztec.circuit.proving.input_size';
29
- export const CIRCUIT_PROVING_PROOF_SIZE = 'aztec.circuit.proving.proof_size';
74
+ export const CIRCUIT_SIMULATION_DURATION: MetricDefinition = {
75
+ name: 'aztec.circuit.simulation.duration',
76
+ description: 'Records how long it takes to simulate a circuit',
77
+ unit: 'ms',
78
+ valueType: ValueType.INT,
79
+ };
80
+ export const CIRCUIT_SIMULATION_INPUT_SIZE: MetricDefinition = {
81
+ name: 'aztec.circuit.simulation.input_size',
82
+ description: 'Size of the input to the circuit simulation',
83
+ unit: 'By',
84
+ valueType: ValueType.INT,
85
+ };
86
+ export const CIRCUIT_SIMULATION_OUTPUT_SIZE: MetricDefinition = {
87
+ name: 'aztec.circuit.simulation.output_size',
88
+ description: 'Size of the output of the circuit simulation',
89
+ unit: 'By',
90
+ valueType: ValueType.INT,
91
+ };
30
92
 
31
- export const CIRCUIT_PUBLIC_INPUTS_COUNT = 'aztec.circuit.public_inputs_count';
32
- export const CIRCUIT_GATE_COUNT = 'aztec.circuit.gate_count';
33
- export const CIRCUIT_SIZE = 'aztec.circuit.size';
93
+ export const CIRCUIT_WITNESS_GEN_DURATION: MetricDefinition = {
94
+ name: 'aztec.circuit.witness_generation.duration',
95
+ description: 'Records how long it takes to generate the partial witness for a circuit',
96
+ unit: 's',
97
+ valueType: ValueType.DOUBLE,
98
+ };
99
+ export const CIRCUIT_WITNESS_GEN_INPUT_SIZE: MetricDefinition = {
100
+ name: 'aztec.circuit.witness_generation.input_size',
101
+ description: 'Records the size of the input to the witness generation',
102
+ unit: 'By',
103
+ valueType: ValueType.INT,
104
+ };
105
+ export const CIRCUIT_WITNESS_GEN_OUTPUT_SIZE: MetricDefinition = {
106
+ name: 'aztec.circuit.witness_generation.output_size',
107
+ description: 'Records the size of the output of the witness generation',
108
+ unit: 'By',
109
+ valueType: ValueType.INT,
110
+ };
34
111
 
35
- export const MEMPOOL_TX_COUNT = 'aztec.mempool.tx_count';
36
- export const MEMPOOL_TX_SIZE = 'aztec.mempool.tx_size';
37
- export const MEMPOOL_TX_ADDED_COUNT = 'aztec.mempool.tx_added_count';
38
- export const MEMPOOL_TX_MINED_DELAY = 'aztec.mempool.tx_mined_delay';
112
+ export const CIRCUIT_PROVING_DURATION: MetricDefinition = {
113
+ name: 'aztec.circuit.proving.duration',
114
+ description: 'Records how long it takes to prove a circuit',
115
+ unit: 's',
116
+ valueType: ValueType.DOUBLE,
117
+ };
118
+ export const CIRCUIT_PROVING_INPUT_SIZE: MetricDefinition = {
119
+ name: 'aztec.circuit.proving.input_size',
120
+ description: 'Size of the input to the circuit proving',
121
+ unit: 'By',
122
+ valueType: ValueType.INT,
123
+ };
124
+ export const CIRCUIT_PROVING_PROOF_SIZE: MetricDefinition = {
125
+ name: 'aztec.circuit.proving.proof_size',
126
+ description: 'Records the size of the proof generated for a circuit',
127
+ unit: 'By',
128
+ valueType: ValueType.INT,
129
+ };
39
130
 
40
- export const DB_NUM_ITEMS = 'aztec.db.num_items';
41
- export const DB_MAP_SIZE = 'aztec.db.map_size';
42
- export const DB_PHYSICAL_FILE_SIZE = 'aztec.db.physical_file_size';
43
- export const DB_USED_SIZE = 'aztec.db.used_size';
131
+ export const CIRCUIT_PUBLIC_INPUTS_COUNT: MetricDefinition = {
132
+ name: 'aztec.circuit.public_inputs_count',
133
+ description: 'Records the number of public inputs in a circuit',
134
+ valueType: ValueType.INT,
135
+ };
136
+ export const CIRCUIT_GATE_COUNT: MetricDefinition = {
137
+ name: 'aztec.circuit.gate_count',
138
+ description: 'Records the gate count of a circuit',
139
+ valueType: ValueType.INT,
140
+ };
141
+ export const CIRCUIT_SIZE: MetricDefinition = {
142
+ name: 'aztec.circuit.size',
143
+ description: 'Records the size of the circuit in gates',
144
+ valueType: ValueType.INT,
145
+ };
44
146
 
45
- export const MEMPOOL_ATTESTATIONS_COUNT = 'aztec.mempool.attestations_count';
46
- export const MEMPOOL_ATTESTATIONS_SIZE = 'aztec.mempool.attestations_size';
47
- export const MEMPOOL_ATTESTATIONS_ADDED_COUNT = 'aztec.mempool.attestations_added_count';
48
- export const MEMPOOL_ATTESTATIONS_MINED_DELAY = 'aztec.mempool.attestations_mined_delay';
147
+ export const MEMPOOL_TX_COUNT: MetricDefinition = {
148
+ name: 'aztec.mempool.tx_count',
149
+ description: 'The current number of transactions in the mempool',
150
+ valueType: ValueType.INT,
151
+ };
152
+ export const MEMPOOL_TX_SIZE: MetricDefinition = {
153
+ name: 'aztec.mempool.tx_size',
154
+ description: 'The size of transactions in the mempool',
155
+ unit: 'By',
156
+ valueType: ValueType.INT,
157
+ };
158
+ export const MEMPOOL_TX_ADDED_COUNT: MetricDefinition = {
159
+ name: 'aztec.mempool.tx_added_count',
160
+ description: 'The number of transactions added to the mempool',
161
+ valueType: ValueType.INT,
162
+ };
163
+ export const MEMPOOL_TX_MINED_DELAY: MetricDefinition = {
164
+ name: 'aztec.mempool.tx_mined_delay',
165
+ description: 'Delay between transaction added and evicted from the mempool',
166
+ unit: 'ms',
167
+ valueType: ValueType.INT,
168
+ };
49
169
 
50
- export const ARCHIVER_L1_BLOCK_HEIGHT = 'aztec.archiver.l1_block_height';
51
- export const ARCHIVER_BLOCK_HEIGHT = 'aztec.archiver.block_height';
52
- export const ARCHIVER_ROLLUP_PROOF_DELAY = 'aztec.archiver.rollup_proof_delay';
53
- export const ARCHIVER_ROLLUP_PROOF_COUNT = 'aztec.archiver.rollup_proof_count';
170
+ export const DB_NUM_ITEMS: MetricDefinition = {
171
+ name: 'aztec.db.num_items',
172
+ description: 'LMDB Num Items',
173
+ valueType: ValueType.INT,
174
+ };
175
+ export const DB_MAP_SIZE: MetricDefinition = {
176
+ name: 'aztec.db.map_size',
177
+ description: 'LMDB Map Size',
178
+ unit: 'By',
179
+ valueType: ValueType.INT,
180
+ };
181
+ export const DB_PHYSICAL_FILE_SIZE: MetricDefinition = {
182
+ name: 'aztec.db.physical_file_size',
183
+ description: 'LMDB Physical File Size',
184
+ unit: 'By',
185
+ valueType: ValueType.INT,
186
+ };
187
+ export const DB_USED_SIZE: MetricDefinition = {
188
+ name: 'aztec.db.used_size',
189
+ description: 'LMDB Used Size',
190
+ unit: 'By',
191
+ valueType: ValueType.INT,
192
+ };
54
193
 
55
- export const ARCHIVER_MANA_PER_BLOCK = 'aztec.archiver.block.mana_count';
56
- export const ARCHIVER_TXS_PER_BLOCK = 'aztec.archiver.block.tx_count';
57
- export const ARCHIVER_SYNC_PER_BLOCK = 'aztec.archiver.block.sync_per_item_duration';
58
- export const ARCHIVER_SYNC_BLOCK_COUNT = 'aztec.archiver.block.sync_count';
194
+ export const MEMPOOL_ATTESTATIONS_COUNT: MetricDefinition = {
195
+ name: 'aztec.mempool.attestations_count',
196
+ description: 'The current number of attestations in the mempool',
197
+ valueType: ValueType.INT,
198
+ };
199
+ export const MEMPOOL_ATTESTATIONS_SIZE: MetricDefinition = {
200
+ name: 'aztec.mempool.attestations_size',
201
+ description: 'The size of attestations in the mempool',
202
+ unit: 'By',
203
+ valueType: ValueType.INT,
204
+ };
205
+ export const MEMPOOL_ATTESTATIONS_ADDED_COUNT: MetricDefinition = {
206
+ name: 'aztec.mempool.attestations_added_count',
207
+ description: 'The number of attestations added to the mempool',
208
+ valueType: ValueType.INT,
209
+ };
210
+ export const MEMPOOL_ATTESTATIONS_MINED_DELAY: MetricDefinition = {
211
+ name: 'aztec.mempool.attestations_mined_delay',
212
+ description: 'Delay between attestation added and evicted from the mempool',
213
+ unit: 'ms',
214
+ valueType: ValueType.INT,
215
+ };
59
216
 
60
- export const ARCHIVER_SYNC_PER_MESSAGE = 'aztec.archiver.message.sync_per_item_duration';
61
- export const ARCHIVER_SYNC_MESSAGE_COUNT = 'aztec.archiver.message.sync_count';
217
+ export const ARCHIVER_L1_BLOCK_HEIGHT: MetricDefinition = {
218
+ name: 'aztec.archiver.l1_block_height',
219
+ description: 'The height of the latest L1 block processed by the archiver',
220
+ valueType: ValueType.INT,
221
+ };
222
+ export const ARCHIVER_BLOCK_HEIGHT: MetricDefinition = {
223
+ name: 'aztec.archiver.block_height',
224
+ description: 'The height of the latest block processed by the archiver',
225
+ valueType: ValueType.INT,
226
+ };
227
+ export const ARCHIVER_ROLLUP_PROOF_DELAY: MetricDefinition = {
228
+ name: 'aztec.archiver.rollup_proof_delay',
229
+ description: 'Time after a block is submitted until its proof is published',
230
+ unit: 'ms',
231
+ valueType: ValueType.INT,
232
+ };
233
+ export const ARCHIVER_ROLLUP_PROOF_COUNT: MetricDefinition = {
234
+ name: 'aztec.archiver.rollup_proof_count',
235
+ description: 'Number of proofs submitted',
236
+ valueType: ValueType.INT,
237
+ };
62
238
 
63
- export const ARCHIVER_PRUNE_DURATION = 'aztec.archiver.prune_duration';
64
- export const ARCHIVER_PRUNE_COUNT = 'aztec.archiver.prune_count';
239
+ export const ARCHIVER_MANA_PER_BLOCK: MetricDefinition = {
240
+ name: 'aztec.archiver.block.mana_count',
241
+ description: 'The mana consumed by blocks',
242
+ unit: 'Mmana',
243
+ valueType: ValueType.DOUBLE,
244
+ };
245
+ export const ARCHIVER_TXS_PER_BLOCK: MetricDefinition = {
246
+ name: 'aztec.archiver.block.tx_count',
247
+ description: 'The block tx count',
248
+ unit: 'tx',
249
+ valueType: ValueType.INT,
250
+ };
251
+ export const ARCHIVER_SYNC_PER_BLOCK: MetricDefinition = {
252
+ name: 'aztec.archiver.block.sync_per_item_duration',
253
+ description: 'Duration to sync a block',
254
+ unit: 'ms',
255
+ valueType: ValueType.INT,
256
+ };
257
+ export const ARCHIVER_SYNC_BLOCK_COUNT: MetricDefinition = {
258
+ name: 'aztec.archiver.block.sync_count',
259
+ description: 'Number of blocks synced from L1',
260
+ valueType: ValueType.INT,
261
+ };
65
262
 
66
- export const ARCHIVER_TOTAL_TXS = 'aztec.archiver.tx_count';
263
+ export const ARCHIVER_SYNC_PER_MESSAGE: MetricDefinition = {
264
+ name: 'aztec.archiver.message.sync_per_item_duration',
265
+ description: 'Duration to sync a message',
266
+ unit: 'ms',
267
+ valueType: ValueType.INT,
268
+ };
269
+ export const ARCHIVER_SYNC_MESSAGE_COUNT: MetricDefinition = {
270
+ name: 'aztec.archiver.message.sync_count',
271
+ description: 'Number of L1 to L2 messages synced',
272
+ valueType: ValueType.INT,
273
+ };
67
274
 
68
- export const ARCHIVER_BLOCK_PROPOSAL_TX_TARGET_COUNT = 'aztec.archiver.block_proposal_tx_target_count';
275
+ export const ARCHIVER_PRUNE_DURATION: MetricDefinition = {
276
+ name: 'aztec.archiver.prune_duration',
277
+ description: 'Duration of a prune operation',
278
+ unit: 'ms',
279
+ valueType: ValueType.INT,
280
+ };
281
+ export const ARCHIVER_PRUNE_COUNT: MetricDefinition = {
282
+ name: 'aztec.archiver.prune_count',
283
+ description: 'Number of prunes detected',
284
+ valueType: ValueType.INT,
285
+ };
69
286
 
70
- export const NODE_RECEIVE_TX_DURATION = 'aztec.node.receive_tx.duration';
71
- export const NODE_RECEIVE_TX_COUNT = 'aztec.node.receive_tx.count';
287
+ export const ARCHIVER_TOTAL_TXS: MetricDefinition = {
288
+ name: 'aztec.archiver.tx_count',
289
+ description: 'The total number of transactions',
290
+ valueType: ValueType.INT,
291
+ };
72
292
 
73
- export const NODE_SNAPSHOT_DURATION = 'aztec.node.snapshot_duration';
74
- export const NODE_SNAPSHOT_ERROR_COUNT = 'aztec.node.snapshot_error_count';
293
+ export const ARCHIVER_BLOCK_PROPOSAL_TX_TARGET_COUNT: MetricDefinition = {
294
+ name: 'aztec.archiver.block_proposal_tx_target_count',
295
+ description: 'Number of block proposals by tx target',
296
+ valueType: ValueType.INT,
297
+ };
75
298
 
76
- export const SEQUENCER_STATE_TRANSITION_BUFFER_DURATION = 'aztec.sequencer.state_transition_buffer.duration';
77
- export const SEQUENCER_BLOCK_BUILD_DURATION = 'aztec.sequencer.block.build_duration';
78
- export const SEQUENCER_BLOCK_BUILD_MANA_PER_SECOND = 'aztec.sequencer.block.build_mana_per_second';
79
- export const SEQUENCER_BLOCK_COUNT = 'aztec.sequencer.block.count';
80
- export const SEQUENCER_CURRENT_BLOCK_REWARDS = 'aztec.sequencer.current_block_rewards';
81
- export const SEQUENCER_SLOT_COUNT = 'aztec.sequencer.slot.total_count';
82
- export const SEQUENCER_FILLED_SLOT_COUNT = 'aztec.sequencer.slot.filled_count';
299
+ export const NODE_RECEIVE_TX_DURATION: MetricDefinition = {
300
+ name: 'aztec.node.receive_tx.duration',
301
+ description: 'The duration of the receiveTx method',
302
+ unit: 'ms',
303
+ valueType: ValueType.INT,
304
+ };
305
+ export const NODE_RECEIVE_TX_COUNT: MetricDefinition = {
306
+ name: 'aztec.node.receive_tx.count',
307
+ description: 'Number of transactions received',
308
+ valueType: ValueType.INT,
309
+ };
83
310
 
84
- export const SEQUENCER_BLOCK_ATTESTATION_DELAY = 'aztec.sequencer.block.attestation_delay';
311
+ export const NODE_SNAPSHOT_DURATION: MetricDefinition = {
312
+ name: 'aztec.node.snapshot_duration',
313
+ description: 'How long taking a snapshot takes',
314
+ unit: 'ms',
315
+ valueType: ValueType.INT,
316
+ };
317
+ export const NODE_SNAPSHOT_ERROR_COUNT: MetricDefinition = {
318
+ name: 'aztec.node.snapshot_error_count',
319
+ description: 'How many snapshot errors have happened',
320
+ valueType: ValueType.INT,
321
+ };
85
322
 
86
- export const SEQUENCER_COLLECTED_ATTESTATIONS_COUNT = 'aztec.sequencer.attestations.collected_count';
87
- export const SEQUENCER_REQUIRED_ATTESTATIONS_COUNT = 'aztec.sequencer.attestations.required_count';
88
- export const SEQUENCER_COLLECT_ATTESTATIONS_DURATION = 'aztec.sequencer.attestations.collect_duration';
89
- export const SEQUENCER_COLLECT_ATTESTATIONS_TIME_ALLOWANCE = 'aztec.sequencer.attestations.collect_allowance';
323
+ export const SEQUENCER_STATE_TRANSITION_BUFFER_DURATION: MetricDefinition = {
324
+ name: 'aztec.sequencer.state_transition_buffer.duration',
325
+ description:
326
+ 'The time difference between when the sequencer needed to transition to a new state and when it actually did',
327
+ unit: 'ms',
328
+ valueType: ValueType.INT,
329
+ };
330
+ export const SEQUENCER_BLOCK_BUILD_DURATION: MetricDefinition = {
331
+ name: 'aztec.sequencer.block.build_duration',
332
+ description: 'Duration to build a block',
333
+ unit: 'ms',
334
+ valueType: ValueType.INT,
335
+ };
336
+ export const SEQUENCER_BLOCK_BUILD_MANA_PER_SECOND: MetricDefinition = {
337
+ name: 'aztec.sequencer.block.build_mana_per_second',
338
+ description: 'Mana per second when building a block',
339
+ unit: 'mana/s',
340
+ valueType: ValueType.INT,
341
+ };
342
+ export const SEQUENCER_BLOCK_COUNT: MetricDefinition = {
343
+ name: 'aztec.sequencer.block.count',
344
+ description: 'Number of blocks built by this sequencer',
345
+ valueType: ValueType.INT,
346
+ };
347
+ export const SEQUENCER_CURRENT_BLOCK_REWARDS: MetricDefinition = {
348
+ name: 'aztec.sequencer.current_block_rewards',
349
+ description: 'The rewards earned',
350
+ valueType: ValueType.DOUBLE,
351
+ };
352
+ export const SEQUENCER_SLOT_COUNT: MetricDefinition = {
353
+ name: 'aztec.sequencer.slot.total_count',
354
+ description: 'The number of slots this sequencer was selected for',
355
+ valueType: ValueType.INT,
356
+ };
357
+ export const SEQUENCER_FILLED_SLOT_COUNT: MetricDefinition = {
358
+ name: 'aztec.sequencer.slot.filled_count',
359
+ description: 'The number of slots this sequencer has filled',
360
+ valueType: ValueType.INT,
361
+ };
90
362
 
91
- export const SEQUENCER_BLOCK_PROPOSAL_FAILED_COUNT = 'aztec.sequencer.block.proposal_failed_count';
92
- export const SEQUENCER_BLOCK_PROPOSAL_SUCCESS_COUNT = 'aztec.sequencer.block.proposal_success_count';
93
- export const SEQUENCER_BLOCK_PROPOSAL_PRECHECK_FAILED_COUNT = 'aztec.sequencer.block.proposal_precheck_failed_count';
94
- export const SEQUENCER_SLASHING_ATTEMPTS_COUNT = 'aztec.sequencer.slashing.attempts_count';
95
- export const SEQUENCER_CHECKPOINT_SUCCESS_COUNT = 'aztec.sequencer.checkpoint.success_count';
363
+ export const SEQUENCER_BLOCK_ATTESTATION_DELAY: MetricDefinition = {
364
+ name: 'aztec.sequencer.block.attestation_delay',
365
+ description: 'The time difference between block proposal and minimal attestation count reached',
366
+ unit: 'ms',
367
+ valueType: ValueType.INT,
368
+ };
369
+
370
+ export const SEQUENCER_COLLECTED_ATTESTATIONS_COUNT: MetricDefinition = {
371
+ name: 'aztec.sequencer.attestations.collected_count',
372
+ description: 'The number of attestations collected for a block proposal',
373
+ valueType: ValueType.INT,
374
+ };
375
+ export const SEQUENCER_REQUIRED_ATTESTATIONS_COUNT: MetricDefinition = {
376
+ name: 'aztec.sequencer.attestations.required_count',
377
+ description: 'The minimum number of attestations required to publish a block',
378
+ valueType: ValueType.INT,
379
+ };
380
+ export const SEQUENCER_COLLECT_ATTESTATIONS_DURATION: MetricDefinition = {
381
+ name: 'aztec.sequencer.attestations.collect_duration',
382
+ description: 'The time spent collecting attestations from committee members',
383
+ unit: 'ms',
384
+ valueType: ValueType.INT,
385
+ };
386
+ export const SEQUENCER_COLLECT_ATTESTATIONS_TIME_ALLOWANCE: MetricDefinition = {
387
+ name: 'aztec.sequencer.attestations.collect_allowance',
388
+ description: 'Maximum amount of time to collect attestations',
389
+ unit: 'ms',
390
+ valueType: ValueType.INT,
391
+ };
392
+
393
+ export const SEQUENCER_BLOCK_PROPOSAL_FAILED_COUNT: MetricDefinition = {
394
+ name: 'aztec.sequencer.block.proposal_failed_count',
395
+ description: 'The number of times block proposal failed (including validation builds)',
396
+ valueType: ValueType.INT,
397
+ };
398
+ export const SEQUENCER_BLOCK_PROPOSAL_SUCCESS_COUNT: MetricDefinition = {
399
+ name: 'aztec.sequencer.block.proposal_success_count',
400
+ description: 'The number of times block proposal succeeded (including validation builds)',
401
+ valueType: ValueType.INT,
402
+ };
403
+ export const SEQUENCER_BLOCK_PROPOSAL_PRECHECK_FAILED_COUNT: MetricDefinition = {
404
+ name: 'aztec.sequencer.block.proposal_precheck_failed_count',
405
+ description: 'The number of times block proposal pre-build checks failed',
406
+ valueType: ValueType.INT,
407
+ };
408
+ export const SEQUENCER_SLASHING_ATTEMPTS_COUNT: MetricDefinition = {
409
+ name: 'aztec.sequencer.slashing.attempts_count',
410
+ description: 'The number of slashing action attempts',
411
+ valueType: ValueType.INT,
412
+ };
413
+ export const SEQUENCER_CHECKPOINT_SUCCESS_COUNT: MetricDefinition = {
414
+ name: 'aztec.sequencer.checkpoint.success_count',
415
+ description: 'The number of times checkpoint publishing succeeded',
416
+ valueType: ValueType.INT,
417
+ };
96
418
 
97
419
  // Fisherman fee analysis metrics
98
- export const FISHERMAN_FEE_ANALYSIS_WOULD_BE_INCLUDED = 'aztec.fisherman.fee_analysis.would_be_included';
99
- export const FISHERMAN_FEE_ANALYSIS_TIME_BEFORE_BLOCK = 'aztec.fisherman.fee_analysis.time_before_block';
100
- export const FISHERMAN_FEE_ANALYSIS_PENDING_BLOB_TX_COUNT = 'aztec.fisherman.fee_analysis.pending_blob_tx_count';
101
- export const FISHERMAN_FEE_ANALYSIS_INCLUDED_BLOB_TX_COUNT = 'aztec.fisherman.fee_analysis.included_blob_tx_count';
102
- export const FISHERMAN_FEE_ANALYSIS_CALCULATED_PRIORITY_FEE = 'aztec.fisherman.fee_analysis.calculated_priority_fee';
103
- export const FISHERMAN_FEE_ANALYSIS_PRIORITY_FEE_DELTA = 'aztec.fisherman.fee_analysis.priority_fee_delta';
104
- export const FISHERMAN_FEE_ANALYSIS_ESTIMATED_COST = 'aztec.fisherman.fee_analysis.estimated_cost';
105
- export const FISHERMAN_FEE_ANALYSIS_ESTIMATED_OVERPAYMENT = 'aztec.fisherman.fee_analysis.estimated_overpayment';
106
- export const FISHERMAN_FEE_ANALYSIS_MINED_BLOB_TX_PRIORITY_FEE =
107
- 'aztec.fisherman.fee_analysis.mined_blob_tx_priority_fee';
108
- export const FISHERMAN_FEE_ANALYSIS_MINED_BLOB_TX_TOTAL_COST = 'aztec.fisherman.fee_analysis.mined_blob_tx_total_cost';
109
-
110
- export const VALIDATOR_INVALID_ATTESTATION_RECEIVED_COUNT = 'aztec.validator.invalid_attestation_received_count';
111
-
112
- export const L1_PUBLISHER_GAS_PRICE = 'aztec.l1_publisher.gas_price';
113
- export const L1_PUBLISHER_TX_COUNT = 'aztec.l1_publisher.tx_count';
114
- export const L1_PUBLISHER_TX_DURATION = 'aztec.l1_publisher.tx_duration';
115
- export const L1_PUBLISHER_TX_GAS = 'aztec.l1_publisher.tx_gas';
116
- export const L1_PUBLISHER_TX_CALLDATA_SIZE = 'aztec.l1_publisher.tx_calldata_size';
117
- export const L1_PUBLISHER_TX_CALLDATA_GAS = 'aztec.l1_publisher.tx_calldata_gas';
118
- export const L1_PUBLISHER_TX_BLOBDATA_GAS_USED = 'aztec.l1_publisher.tx_blobdata_gas_used';
119
- export const L1_PUBLISHER_TX_BLOBDATA_GAS_COST = 'aztec.l1_publisher.tx_blobdata_gas_cost';
120
- export const L1_PUBLISHER_BLOB_COUNT = 'aztec.l1_publisher.blob_count';
121
- export const L1_PUBLISHER_BLOB_INCLUSION_BLOCKS = 'aztec.l1_publisher.blob_inclusion_blocks';
122
- export const L1_PUBLISHER_BLOB_TX_SUCCESS = 'aztec.l1_publisher.blob_tx_success';
123
- export const L1_PUBLISHER_BLOB_TX_FAILURE = 'aztec.l1_publisher.blob_tx_failure';
124
- export const L1_PUBLISHER_BALANCE = 'aztec.l1_publisher.balance';
125
- export const L1_PUBLISHER_TX_TOTAL_FEE = 'aztec.l1_publisher.tx_total_fee';
126
-
127
- export const L1_BLOCK_HEIGHT = 'aztec.l1.block_height';
128
- export const L1_BALANCE_ETH = 'aztec.l1.balance';
129
- export const L1_GAS_PRICE_WEI = 'aztec.l1.gas_price';
130
- export const L1_BLOB_BASE_FEE_WEI = 'aztec.l1.blob_base_fee';
131
-
132
- export const L1_TX_MINED_DURATION = 'aztec.l1_tx.mined_duration';
133
- export const L1_TX_MINED_COUNT = 'aztec.l1_tx.mined_count';
134
- export const L1_TX_REVERTED_COUNT = 'aztec.l1_tx.reverted_count';
135
- export const L1_TX_CANCELLED_COUNT = 'aztec.l1_tx.cancelled_count';
136
- export const L1_TX_NOT_MINED_COUNT = 'aztec.l1_tx.not_mined_count';
137
- export const L1_TX_ATTEMPTS_UNTIL_MINED = 'aztec.l1_tx.attempts_until_mined';
138
- export const L1_TX_MAX_PRIORITY_FEE = 'aztec.l1_tx.max_priority_fee';
139
- export const L1_TX_MAX_FEE = 'aztec.l1_tx.max_fee';
140
- export const L1_TX_BLOB_FEE = 'aztec.l1_tx.blob_fee';
141
-
142
- export const PEER_MANAGER_GOODBYES_SENT = 'aztec.peer_manager.goodbyes_sent';
143
- export const PEER_MANAGER_GOODBYES_RECEIVED = 'aztec.peer_manager.goodbyes_received';
144
- export const PEER_MANAGER_PEER_COUNT = 'aztec.peer_manager.peer_count';
145
- export const PEER_MANAGER_LOW_SCORE_DISCONNECTS = 'aztec.peer_manager.low_score_disconnects';
146
- export const PEER_MANAGER_PEER_CONNECTION_DURATION = 'aztec.peer_manager.peer_connection_duration';
147
- export const P2P_PEER_STATE_COUNT = 'aztec.p2p.peer_state_count';
148
-
149
- export const P2P_REQ_RESP_SENT_REQUESTS = 'aztec.p2p.req_resp.sent_requests';
150
- export const P2P_REQ_RESP_RECEIVED_REQUESTS = 'aztec.p2p.req_resp.received_requests';
151
- export const P2P_REQ_RESP_FAILED_OUTBOUND_REQUESTS = 'aztec.p2p.req_resp.failed_outbound_requests';
152
- export const P2P_REQ_RESP_FAILED_INBOUND_REQUESTS = 'aztec.p2p.req_resp.failed_inbound_requests';
153
-
154
- export const P2P_GOSSIP_MESSAGE_VALIDATION_DURATION = 'aztec.p2p.gossip.message_validation_duration';
155
- export const P2P_GOSSIP_MESSAGE_PREVALIDATION_COUNT = 'aztec.p2p.gossip.message_validation_count';
156
- export const P2P_GOSSIP_MESSAGE_LATENCY = 'aztec.p2p.gossip.message_latency';
157
- export const P2P_GOSSIP_TX_RECEIVED_COUNT = 'aztec.p2p.gossip.tx_received_count';
158
-
159
- export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_MIN = 'aztec.p2p.gossip.agg_message_latency_min';
160
- export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_MAX = 'aztec.p2p.gossip.agg_message_latency_max';
161
- export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_P50 = 'aztec.p2p.gossip.agg_message_latency_p50';
162
- export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_P90 = 'aztec.p2p.gossip.agg_message_latency_p90';
163
- export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_AVG = 'aztec.p2p.gossip.agg_message_latency_avg';
164
-
165
- export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_MIN = 'aztec.p2p.gossip.agg_message_validation_duration_min';
166
- export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_MAX = 'aztec.p2p.gossip.agg_message_validation_duration_max';
167
- export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_P50 = 'aztec.p2p.gossip.agg_message_validation_duration_p50';
168
- export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_P90 = 'aztec.p2p.gossip.agg_message_validation_duration_p90';
169
- export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_AVG = 'aztec.p2p.gossip.agg_message_validation_duration_avg';
170
-
171
- export const PUBLIC_PROCESSOR_TX_DURATION = 'aztec.public_processor.tx_duration';
172
- export const PUBLIC_PROCESSOR_TX_COUNT = 'aztec.public_processor.tx_count';
173
- export const PUBLIC_PROCESSOR_TX_PHASE_COUNT = 'aztec.public_processor.tx_phase_count';
174
- export const PUBLIC_PROCESSOR_TX_GAS = 'aztec.public_processor.tx_gas';
175
- export const PUBLIC_PROCESSOR_PHASE_DURATION = 'aztec.public_processor.phase_duration';
176
- export const PUBLIC_PROCESSOR_PHASE_COUNT = 'aztec.public_processor.phase_count';
177
- export const PUBLIC_PROCESSOR_DEPLOY_BYTECODE_SIZE = 'aztec.public_processor.deploy_bytecode_size';
178
- export const PUBLIC_PROCESSOR_TOTAL_GAS = 'aztec.public_processor.total_gas';
179
- export const PUBLIC_PROCESSOR_TOTAL_GAS_HISTOGRAM = 'aztec.public_processor.total_gas_histogram';
180
- export const PUBLIC_PROCESSOR_GAS_RATE = 'aztec.public_processor.gas_rate';
181
- export const PUBLIC_PROCESSOR_TREE_INSERTION = 'aztec.public_processor.tree_insertion';
420
+ export const FISHERMAN_FEE_ANALYSIS_WOULD_BE_INCLUDED: MetricDefinition = {
421
+ name: 'aztec.fisherman.fee_analysis.would_be_included',
422
+ description: 'Whether the transaction would have been included in the block',
423
+ valueType: ValueType.INT,
424
+ };
425
+ export const FISHERMAN_FEE_ANALYSIS_TIME_BEFORE_BLOCK: MetricDefinition = {
426
+ name: 'aztec.fisherman.fee_analysis.time_before_block',
427
+ description: 'Time in ms between fee analysis and block being mined',
428
+ unit: 'ms',
429
+ valueType: ValueType.INT,
430
+ };
431
+ export const FISHERMAN_FEE_ANALYSIS_PENDING_BLOB_TX_COUNT: MetricDefinition = {
432
+ name: 'aztec.fisherman.fee_analysis.pending_blob_tx_count',
433
+ description: 'Number of blob transactions seen in the pending block',
434
+ valueType: ValueType.INT,
435
+ };
436
+ export const FISHERMAN_FEE_ANALYSIS_INCLUDED_BLOB_TX_COUNT: MetricDefinition = {
437
+ name: 'aztec.fisherman.fee_analysis.included_blob_tx_count',
438
+ description: 'Number of blob transactions that got included in the mined block',
439
+ valueType: ValueType.INT,
440
+ };
441
+ export const FISHERMAN_FEE_ANALYSIS_CALCULATED_PRIORITY_FEE: MetricDefinition = {
442
+ name: 'aztec.fisherman.fee_analysis.calculated_priority_fee',
443
+ description: 'Priority fee calculated by each strategy',
444
+ unit: 'gwei',
445
+ valueType: ValueType.DOUBLE,
446
+ };
447
+ export const FISHERMAN_FEE_ANALYSIS_PRIORITY_FEE_DELTA: MetricDefinition = {
448
+ name: 'aztec.fisherman.fee_analysis.priority_fee_delta',
449
+ description: 'Difference between our priority fee and minimum included priority fee',
450
+ unit: 'gwei',
451
+ valueType: ValueType.DOUBLE,
452
+ };
453
+ export const FISHERMAN_FEE_ANALYSIS_ESTIMATED_COST: MetricDefinition = {
454
+ name: 'aztec.fisherman.fee_analysis.estimated_cost',
455
+ description: 'Estimated total cost in ETH for the transaction with this strategy',
456
+ unit: 'eth',
457
+ valueType: ValueType.DOUBLE,
458
+ };
459
+ export const FISHERMAN_FEE_ANALYSIS_ESTIMATED_OVERPAYMENT: MetricDefinition = {
460
+ name: 'aztec.fisherman.fee_analysis.estimated_overpayment',
461
+ description: 'Estimated overpayment in ETH vs minimum required for inclusion',
462
+ unit: 'eth',
463
+ valueType: ValueType.DOUBLE,
464
+ };
465
+ export const FISHERMAN_FEE_ANALYSIS_MINED_BLOB_TX_PRIORITY_FEE: MetricDefinition = {
466
+ name: 'aztec.fisherman.fee_analysis.mined_blob_tx_priority_fee',
467
+ description: 'Priority fee per gas for blob transactions in mined blocks',
468
+ unit: 'gwei',
469
+ valueType: ValueType.DOUBLE,
470
+ };
471
+ export const FISHERMAN_FEE_ANALYSIS_MINED_BLOB_TX_TOTAL_COST: MetricDefinition = {
472
+ name: 'aztec.fisherman.fee_analysis.mined_blob_tx_total_cost',
473
+ description: 'Total cost in ETH for blob transactions in mined blocks',
474
+ unit: 'eth',
475
+ valueType: ValueType.DOUBLE,
476
+ };
477
+
478
+ export const VALIDATOR_INVALID_ATTESTATION_RECEIVED_COUNT: MetricDefinition = {
479
+ name: 'aztec.validator.invalid_attestation_received_count',
480
+ description: 'Number of invalid attestations received',
481
+ valueType: ValueType.INT,
482
+ };
483
+
484
+ export const L1_PUBLISHER_GAS_PRICE: MetricDefinition = {
485
+ name: 'aztec.l1_publisher.gas_price',
486
+ description: 'The gas price used for transactions',
487
+ unit: 'gwei',
488
+ valueType: ValueType.DOUBLE,
489
+ };
490
+ export const L1_PUBLISHER_TX_COUNT: MetricDefinition = {
491
+ name: 'aztec.l1_publisher.tx_count',
492
+ description: 'The number of transactions processed',
493
+ };
494
+ export const L1_PUBLISHER_TX_DURATION: MetricDefinition = {
495
+ name: 'aztec.l1_publisher.tx_duration',
496
+ description: 'The duration of transaction processing',
497
+ unit: 'ms',
498
+ valueType: ValueType.INT,
499
+ };
500
+ export const L1_PUBLISHER_TX_GAS: MetricDefinition = {
501
+ name: 'aztec.l1_publisher.tx_gas',
502
+ description: 'The gas consumed by transactions',
503
+ unit: 'gas',
504
+ valueType: ValueType.INT,
505
+ };
506
+ export const L1_PUBLISHER_TX_CALLDATA_SIZE: MetricDefinition = {
507
+ name: 'aztec.l1_publisher.tx_calldata_size',
508
+ description: 'The size of the calldata in transactions',
509
+ unit: 'By',
510
+ valueType: ValueType.INT,
511
+ };
512
+ export const L1_PUBLISHER_TX_CALLDATA_GAS: MetricDefinition = {
513
+ name: 'aztec.l1_publisher.tx_calldata_gas',
514
+ description: 'The gas consumed by the calldata in transactions',
515
+ unit: 'gas',
516
+ valueType: ValueType.INT,
517
+ };
518
+ export const L1_PUBLISHER_TX_BLOBDATA_GAS_USED: MetricDefinition = {
519
+ name: 'aztec.l1_publisher.tx_blobdata_gas_used',
520
+ description: 'The amount of blob gas used in transactions',
521
+ unit: 'gas',
522
+ valueType: ValueType.INT,
523
+ };
524
+ export const L1_PUBLISHER_TX_BLOBDATA_GAS_COST: MetricDefinition = {
525
+ name: 'aztec.l1_publisher.tx_blobdata_gas_cost',
526
+ description: 'The gas cost of blobs in transactions',
527
+ unit: 'gwei',
528
+ valueType: ValueType.INT,
529
+ };
530
+ export const L1_PUBLISHER_BLOB_COUNT: MetricDefinition = {
531
+ name: 'aztec.l1_publisher.blob_count',
532
+ description: 'Number of blobs in L1 transactions',
533
+ unit: 'blobs',
534
+ valueType: ValueType.INT,
535
+ };
536
+ export const L1_PUBLISHER_BLOB_INCLUSION_BLOCKS: MetricDefinition = {
537
+ name: 'aztec.l1_publisher.blob_inclusion_blocks',
538
+ description: 'Number of L1 blocks between blob tx submission and inclusion',
539
+ unit: 'blocks',
540
+ valueType: ValueType.INT,
541
+ };
542
+ export const L1_PUBLISHER_BLOB_TX_SUCCESS: MetricDefinition = {
543
+ name: 'aztec.l1_publisher.blob_tx_success',
544
+ description: 'Number of successful L1 transactions with blobs',
545
+ };
546
+ export const L1_PUBLISHER_BLOB_TX_FAILURE: MetricDefinition = {
547
+ name: 'aztec.l1_publisher.blob_tx_failure',
548
+ description: 'Number of failed L1 transactions with blobs',
549
+ };
550
+ export const L1_PUBLISHER_BALANCE: MetricDefinition = {
551
+ name: 'aztec.l1_publisher.balance',
552
+ description: 'The balance of the sender address',
553
+ unit: 'eth',
554
+ valueType: ValueType.DOUBLE,
555
+ };
556
+ export const L1_PUBLISHER_TX_TOTAL_FEE: MetricDefinition = {
557
+ name: 'aztec.l1_publisher.tx_total_fee',
558
+ description: 'How much L1 tx costs',
559
+ unit: 'eth',
560
+ valueType: ValueType.DOUBLE,
561
+ };
562
+
563
+ export const L1_BLOCK_HEIGHT: MetricDefinition = {
564
+ name: 'aztec.l1.block_height',
565
+ description: 'The current L1 block height',
566
+ valueType: ValueType.INT,
567
+ };
568
+ export const L1_BALANCE_ETH: MetricDefinition = {
569
+ name: 'aztec.l1.balance',
570
+ description: 'ETH balance of an address',
571
+ unit: 'eth',
572
+ valueType: ValueType.DOUBLE,
573
+ };
574
+ export const L1_GAS_PRICE_WEI: MetricDefinition = {
575
+ name: 'aztec.l1.gas_price',
576
+ description: 'Current L1 gas price',
577
+ unit: 'wei',
578
+ valueType: ValueType.INT,
579
+ };
580
+ export const L1_BLOB_BASE_FEE_WEI: MetricDefinition = {
581
+ name: 'aztec.l1.blob_base_fee',
582
+ description: 'Current L1 blob base fee',
583
+ unit: 'wei',
584
+ valueType: ValueType.INT,
585
+ };
586
+
587
+ export const L1_TX_MINED_DURATION: MetricDefinition = {
588
+ name: 'aztec.l1_tx.mined_duration',
589
+ description: 'Duration from L1 tx submission to mining',
590
+ unit: 'ms',
591
+ valueType: ValueType.INT,
592
+ };
593
+ export const L1_TX_MINED_COUNT: MetricDefinition = {
594
+ name: 'aztec.l1_tx.mined_count',
595
+ description: 'Number of L1 transactions mined',
596
+ valueType: ValueType.INT,
597
+ };
598
+ export const L1_TX_REVERTED_COUNT: MetricDefinition = {
599
+ name: 'aztec.l1_tx.reverted_count',
600
+ description: 'Number of L1 transactions reverted',
601
+ valueType: ValueType.INT,
602
+ };
603
+ export const L1_TX_CANCELLED_COUNT: MetricDefinition = {
604
+ name: 'aztec.l1_tx.cancelled_count',
605
+ description: 'Number of L1 transactions cancelled',
606
+ valueType: ValueType.INT,
607
+ };
608
+ export const L1_TX_NOT_MINED_COUNT: MetricDefinition = {
609
+ name: 'aztec.l1_tx.not_mined_count',
610
+ description: 'Number of L1 transactions not mined',
611
+ valueType: ValueType.INT,
612
+ };
613
+ export const L1_TX_ATTEMPTS_UNTIL_MINED: MetricDefinition = {
614
+ name: 'aztec.l1_tx.attempts_until_mined',
615
+ description: 'Number of attempts until L1 tx was mined',
616
+ valueType: ValueType.INT,
617
+ };
618
+ export const L1_TX_MAX_PRIORITY_FEE: MetricDefinition = {
619
+ name: 'aztec.l1_tx.max_priority_fee',
620
+ description: 'Max priority fee used for L1 tx',
621
+ unit: 'gwei',
622
+ valueType: ValueType.DOUBLE,
623
+ };
624
+ export const L1_TX_MAX_FEE: MetricDefinition = {
625
+ name: 'aztec.l1_tx.max_fee',
626
+ description: 'Max fee used for L1 tx',
627
+ unit: 'gwei',
628
+ valueType: ValueType.DOUBLE,
629
+ };
630
+ export const L1_TX_BLOB_FEE: MetricDefinition = {
631
+ name: 'aztec.l1_tx.blob_fee',
632
+ description: 'Blob fee used for L1 tx',
633
+ unit: 'gwei',
634
+ valueType: ValueType.DOUBLE,
635
+ };
636
+
637
+ export const PEER_MANAGER_GOODBYES_SENT: MetricDefinition = {
638
+ name: 'aztec.peer_manager.goodbyes_sent',
639
+ description: 'Number of goodbyes sent to peers',
640
+ unit: 'peers',
641
+ valueType: ValueType.INT,
642
+ };
643
+ export const PEER_MANAGER_GOODBYES_RECEIVED: MetricDefinition = {
644
+ name: 'aztec.peer_manager.goodbyes_received',
645
+ description: 'Number of goodbyes received from peers',
646
+ unit: 'peers',
647
+ valueType: ValueType.INT,
648
+ };
649
+ export const PEER_MANAGER_PEER_COUNT: MetricDefinition = {
650
+ name: 'aztec.peer_manager.peer_count',
651
+ description: 'Number of peers',
652
+ unit: 'peers',
653
+ valueType: ValueType.INT,
654
+ };
655
+ export const PEER_MANAGER_LOW_SCORE_DISCONNECTS: MetricDefinition = {
656
+ name: 'aztec.peer_manager.low_score_disconnects',
657
+ description: 'Number of peers disconnected due to low score',
658
+ unit: 'peers',
659
+ valueType: ValueType.INT,
660
+ };
661
+ export const PEER_MANAGER_PEER_CONNECTION_DURATION: MetricDefinition = {
662
+ name: 'aztec.peer_manager.peer_connection_duration',
663
+ description: 'Time duration between peer connection and disconnection',
664
+ unit: 'ms',
665
+ valueType: ValueType.INT,
666
+ };
667
+ export const P2P_PEER_STATE_COUNT: MetricDefinition = {
668
+ name: 'aztec.p2p.peer_state_count',
669
+ description: 'Number of peers in each state',
670
+ unit: 'peers',
671
+ valueType: ValueType.INT,
672
+ };
673
+
674
+ export const P2P_REQ_RESP_SENT_REQUESTS: MetricDefinition = {
675
+ name: 'aztec.p2p.req_resp.sent_requests',
676
+ description: 'Number of requests sent to peers',
677
+ unit: 'requests',
678
+ valueType: ValueType.INT,
679
+ };
680
+ export const P2P_REQ_RESP_RECEIVED_REQUESTS: MetricDefinition = {
681
+ name: 'aztec.p2p.req_resp.received_requests',
682
+ description: 'Number of requests received from peers',
683
+ unit: 'requests',
684
+ valueType: ValueType.INT,
685
+ };
686
+ export const P2P_REQ_RESP_FAILED_OUTBOUND_REQUESTS: MetricDefinition = {
687
+ name: 'aztec.p2p.req_resp.failed_outbound_requests',
688
+ description: 'Number of failed outbound requests - nodes not getting valid responses',
689
+ unit: 'requests',
690
+ valueType: ValueType.INT,
691
+ };
692
+ export const P2P_REQ_RESP_FAILED_INBOUND_REQUESTS: MetricDefinition = {
693
+ name: 'aztec.p2p.req_resp.failed_inbound_requests',
694
+ description: 'Number of failed inbound requests - node failing to respond to requests',
695
+ unit: 'requests',
696
+ valueType: ValueType.INT,
697
+ };
698
+
699
+ export const P2P_GOSSIP_MESSAGE_VALIDATION_DURATION: MetricDefinition = {
700
+ name: 'aztec.p2p.gossip.message_validation_duration',
701
+ description: 'Duration to validate a gossip message',
702
+ unit: 'ms',
703
+ valueType: ValueType.INT,
704
+ };
705
+ export const P2P_GOSSIP_MESSAGE_PREVALIDATION_COUNT: MetricDefinition = {
706
+ name: 'aztec.p2p.gossip.message_validation_count',
707
+ description: 'Number of gossip messages validated',
708
+ valueType: ValueType.INT,
709
+ };
710
+ export const P2P_GOSSIP_MESSAGE_LATENCY: MetricDefinition = {
711
+ name: 'aztec.p2p.gossip.message_latency',
712
+ description: 'Latency of gossip messages',
713
+ unit: 'ms',
714
+ valueType: ValueType.INT,
715
+ };
716
+ export const P2P_GOSSIP_TX_RECEIVED_COUNT: MetricDefinition = {
717
+ name: 'aztec.p2p.gossip.tx_received_count',
718
+ description: 'Number of transactions received via gossip',
719
+ valueType: ValueType.INT,
720
+ };
721
+
722
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_MIN: MetricDefinition = {
723
+ name: 'aztec.p2p.gossip.agg_message_latency_min',
724
+ description: 'Minimum aggregated gossip message latency',
725
+ unit: 'ms',
726
+ valueType: ValueType.INT,
727
+ };
728
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_MAX: MetricDefinition = {
729
+ name: 'aztec.p2p.gossip.agg_message_latency_max',
730
+ description: 'Maximum aggregated gossip message latency',
731
+ unit: 'ms',
732
+ valueType: ValueType.INT,
733
+ };
734
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_P50: MetricDefinition = {
735
+ name: 'aztec.p2p.gossip.agg_message_latency_p50',
736
+ description: 'P50 aggregated gossip message latency',
737
+ unit: 'ms',
738
+ valueType: ValueType.INT,
739
+ };
740
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_P90: MetricDefinition = {
741
+ name: 'aztec.p2p.gossip.agg_message_latency_p90',
742
+ description: 'P90 aggregated gossip message latency',
743
+ unit: 'ms',
744
+ valueType: ValueType.INT,
745
+ };
746
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_AVG: MetricDefinition = {
747
+ name: 'aztec.p2p.gossip.agg_message_latency_avg',
748
+ description: 'Average aggregated gossip message latency',
749
+ unit: 'ms',
750
+ valueType: ValueType.INT,
751
+ };
752
+
753
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_MIN: MetricDefinition = {
754
+ name: 'aztec.p2p.gossip.agg_message_validation_duration_min',
755
+ description: 'Minimum aggregated gossip message validation duration',
756
+ unit: 'ms',
757
+ valueType: ValueType.INT,
758
+ };
759
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_MAX: MetricDefinition = {
760
+ name: 'aztec.p2p.gossip.agg_message_validation_duration_max',
761
+ description: 'Maximum aggregated gossip message validation duration',
762
+ unit: 'ms',
763
+ valueType: ValueType.INT,
764
+ };
765
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_P50: MetricDefinition = {
766
+ name: 'aztec.p2p.gossip.agg_message_validation_duration_p50',
767
+ description: 'P50 aggregated gossip message validation duration',
768
+ unit: 'ms',
769
+ valueType: ValueType.INT,
770
+ };
771
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_P90: MetricDefinition = {
772
+ name: 'aztec.p2p.gossip.agg_message_validation_duration_p90',
773
+ description: 'P90 aggregated gossip message validation duration',
774
+ unit: 'ms',
775
+ valueType: ValueType.INT,
776
+ };
777
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_AVG: MetricDefinition = {
778
+ name: 'aztec.p2p.gossip.agg_message_validation_duration_avg',
779
+ description: 'Average aggregated gossip message validation duration',
780
+ unit: 'ms',
781
+ valueType: ValueType.INT,
782
+ };
783
+
784
+ export const PUBLIC_PROCESSOR_TX_DURATION: MetricDefinition = {
785
+ name: 'aztec.public_processor.tx_duration',
786
+ description: 'Duration to process a public transaction',
787
+ unit: 'ms',
788
+ valueType: ValueType.INT,
789
+ };
790
+ export const PUBLIC_PROCESSOR_TX_COUNT: MetricDefinition = {
791
+ name: 'aztec.public_processor.tx_count',
792
+ description: 'Number of public transactions processed',
793
+ valueType: ValueType.INT,
794
+ };
795
+ export const PUBLIC_PROCESSOR_TX_PHASE_COUNT: MetricDefinition = {
796
+ name: 'aztec.public_processor.tx_phase_count',
797
+ description: 'Number of phases in public transaction processing',
798
+ valueType: ValueType.INT,
799
+ };
800
+ export const PUBLIC_PROCESSOR_TX_GAS: MetricDefinition = {
801
+ name: 'aztec.public_processor.tx_gas',
802
+ description: 'Gas consumed by public transaction',
803
+ unit: 'gas',
804
+ valueType: ValueType.INT,
805
+ };
806
+ export const PUBLIC_PROCESSOR_PHASE_DURATION: MetricDefinition = {
807
+ name: 'aztec.public_processor.phase_duration',
808
+ description: 'Duration of public processing phase',
809
+ unit: 'ms',
810
+ valueType: ValueType.INT,
811
+ };
812
+ export const PUBLIC_PROCESSOR_PHASE_COUNT: MetricDefinition = {
813
+ name: 'aztec.public_processor.phase_count',
814
+ description: 'Number of public processing phases',
815
+ valueType: ValueType.INT,
816
+ };
817
+ export const PUBLIC_PROCESSOR_DEPLOY_BYTECODE_SIZE: MetricDefinition = {
818
+ name: 'aztec.public_processor.deploy_bytecode_size',
819
+ description: 'Size of deployed bytecode',
820
+ unit: 'By',
821
+ valueType: ValueType.INT,
822
+ };
823
+ export const PUBLIC_PROCESSOR_TOTAL_GAS: MetricDefinition = {
824
+ name: 'aztec.public_processor.total_gas',
825
+ description: 'Total gas consumed by public processor',
826
+ unit: 'gas',
827
+ valueType: ValueType.INT,
828
+ };
829
+ export const PUBLIC_PROCESSOR_TOTAL_GAS_HISTOGRAM: MetricDefinition = {
830
+ name: 'aztec.public_processor.total_gas_histogram',
831
+ description: 'Histogram of total gas consumed by public processor',
832
+ unit: 'gas',
833
+ valueType: ValueType.INT,
834
+ };
835
+ export const PUBLIC_PROCESSOR_GAS_RATE: MetricDefinition = {
836
+ name: 'aztec.public_processor.gas_rate',
837
+ description: 'Gas rate in public processor',
838
+ unit: 'gas/s',
839
+ valueType: ValueType.INT,
840
+ };
841
+ export const PUBLIC_PROCESSOR_TREE_INSERTION: MetricDefinition = {
842
+ name: 'aztec.public_processor.tree_insertion',
843
+ description: 'Duration of tree insertion in public processor',
844
+ unit: 'ms',
845
+ valueType: ValueType.INT,
846
+ };
182
847
 
183
848
  export const PUBLIC_EXECUTOR_PREFIX = 'aztec.public_executor.';
184
- export const PUBLIC_EXECUTOR_SIMULATION_COUNT = 'aztec.public_executor.simulation_count';
185
- export const PUBLIC_EXECUTOR_SIMULATION_DURATION = 'aztec.public_executor.simulation_duration';
186
- export const PUBLIC_EXECUTOR_SIMULATION_MANA_PER_SECOND = 'aztec.public_executor.simulation_mana_per_second';
187
- export const PUBLIC_EXECUTOR_SIMULATION_MANA_USED = 'aztec.public_executor.simulation_mana_used';
188
- export const PUBLIC_EXECUTOR_SIMULATION_TOTAL_INSTRUCTIONS = 'aztec.public_executor.simulation_total_instructions';
189
- export const PUBLIC_EXECUTOR_TX_HASHING = 'aztec.public_executor.tx_hashing';
190
- export const PUBLIC_EXECUTOR_PRIVATE_EFFECTS_INSERTION = 'aztec.public_executor.private_effects_insertion';
191
- export const PUBLIC_EXECUTOR_SIMULATION_BYTECODE_SIZE = 'aztec.public_executor.simulation_bytecode_size';
192
-
193
- export const PROVING_ORCHESTRATOR_BASE_ROLLUP_INPUTS_DURATION =
194
- 'aztec.proving_orchestrator.base_rollup.inputs_duration';
195
-
196
- export const PROVING_QUEUE_JOB_SIZE = 'aztec.proving_queue.job_size';
197
- export const PROVING_QUEUE_SIZE = 'aztec.proving_queue.size';
198
- export const PROVING_QUEUE_TOTAL_JOBS = 'aztec.proving_queue.enqueued_jobs_count';
199
- export const PROVING_QUEUE_CACHED_JOBS = 'aztec.proving_queue.cached_jobs_count';
200
- export const PROVING_QUEUE_ACTIVE_JOBS = 'aztec.proving_queue.active_jobs_count';
201
- export const PROVING_QUEUE_RESOLVED_JOBS = 'aztec.proving_queue.resolved_jobs_count';
202
- export const PROVING_QUEUE_REJECTED_JOBS = 'aztec.proving_queue.rejected_jobs_count';
203
- export const PROVING_QUEUE_RETRIED_JOBS = 'aztec.proving_queue.retried_jobs_count';
204
- export const PROVING_QUEUE_TIMED_OUT_JOBS = 'aztec.proving_queue.timed_out_jobs_count';
205
- export const PROVING_QUEUE_JOB_WAIT = 'aztec.proving_queue.job_wait';
206
- export const PROVING_QUEUE_JOB_DURATION = 'aztec.proving_queue.job_duration';
207
- export const PROVING_QUEUE_DB_NUM_ITEMS = 'aztec.proving_queue.db.num_items';
208
- export const PROVING_QUEUE_DB_MAP_SIZE = 'aztec.proving_queue.db.map_size';
209
- export const PROVING_QUEUE_DB_USED_SIZE = 'aztec.proving_queue.db.used_size';
210
-
211
- export const PROVING_AGENT_IDLE = 'aztec.proving_queue.agent.idle';
212
-
213
- export const PROVER_NODE_EXECUTION_DURATION = 'aztec.prover_node.execution.duration';
214
- export const PROVER_NODE_JOB_DURATION = 'aztec.prover_node.job_duration';
215
- export const PROVER_NODE_JOB_CHECKPOINTS = 'aztec.prover_node.job_checkpoints';
216
- export const PROVER_NODE_JOB_BLOCKS = 'aztec.prover_node.job_blocks';
217
- export const PROVER_NODE_JOB_TRANSACTIONS = 'aztec.prover_node.job_transactions';
218
- export const PROVER_NODE_REWARDS_TOTAL = 'aztec.prover_node.rewards_total';
219
- export const PROVER_NODE_REWARDS_PER_EPOCH = 'aztec.prover_node.rewards_per_epoch';
220
-
221
- export const WORLD_STATE_FORK_DURATION = 'aztec.world_state.fork.duration';
222
- export const WORLD_STATE_SYNC_DURATION = 'aztec.world_state.sync.duration';
223
- export const WORLD_STATE_MERKLE_TREE_SIZE = 'aztec.world_state.merkle_tree_size';
224
- export const WORLD_STATE_DB_SIZE = 'aztec.world_state.db_size';
225
- export const WORLD_STATE_DB_MAP_SIZE = 'aztec.world_state.db_map_size';
226
- export const WORLD_STATE_DB_PHYSICAL_SIZE = 'aztec.world_state.db_physical_size';
227
- export const WORLD_STATE_TREE_SIZE = 'aztec.world_state.tree_size';
228
- export const WORLD_STATE_UNFINALIZED_HEIGHT = 'aztec.world_state.unfinalized_height';
229
- export const WORLD_STATE_FINALIZED_HEIGHT = 'aztec.world_state.finalized_height';
230
- export const WORLD_STATE_OLDEST_BLOCK = 'aztec.world_state.oldest_block';
231
- export const WORLD_STATE_DB_USED_SIZE = 'aztec.world_state.db_used_size';
232
- export const WORLD_STATE_DB_NUM_ITEMS = 'aztec.world_state.db_num_items';
233
- export const WORLD_STATE_REQUEST_TIME = 'aztec.world_state.request_time';
234
- export const WORLD_STATE_CRITICAL_ERROR_COUNT = 'aztec.world_state.critical_error_count';
235
-
236
- export const PROOF_VERIFIER_COUNT = 'aztec.proof_verifier.count';
237
-
238
- export const VALIDATOR_RE_EXECUTION_TIME = 'aztec.validator.re_execution_time';
239
- export const VALIDATOR_RE_EXECUTION_MANA = 'aztec.validator.re_execution_mana';
240
- export const VALIDATOR_RE_EXECUTION_TX_COUNT = 'aztec.validator.re_execution_tx_count';
241
-
242
- export const VALIDATOR_FAILED_REEXECUTION_COUNT = 'aztec.validator.failed_reexecution_count';
243
- export const VALIDATOR_ATTESTATION_SUCCESS_COUNT = 'aztec.validator.attestation_success_count';
244
- export const VALIDATOR_ATTESTATION_FAILED_BAD_PROPOSAL_COUNT = 'aztec.validator.attestation_failed_bad_proposal_count';
245
- export const VALIDATOR_ATTESTATION_FAILED_NODE_ISSUE_COUNT = 'aztec.validator.attestation_failed_node_issue_count';
246
-
247
- export const NODEJS_EVENT_LOOP_DELAY_MIN = 'nodejs.eventloop.delay.min';
248
- export const NODEJS_EVENT_LOOP_DELAY_MEAN = 'nodejs.eventloop.delay.mean';
249
- export const NODEJS_EVENT_LOOP_DELAY_MAX = 'nodejs.eventloop.delay.max';
250
- export const NODEJS_EVENT_LOOP_DELAY_STDDEV = 'nodejs.eventloop.delay.stddev';
251
- export const NODEJS_EVENT_LOOP_DELAY_P50 = 'nodejs.eventloop.delay.p50';
252
- export const NODEJS_EVENT_LOOP_DELAY_P90 = 'nodejs.eventloop.delay.p90';
253
- export const NODEJS_EVENT_LOOP_DELAY_P99 = 'nodejs.eventloop.delay.p99';
254
-
255
- export const NODEJS_EVENT_LOOP_UTILIZATION = 'nodejs.eventloop.utilization';
256
- export const NODEJS_EVENT_LOOP_TIME = 'nodejs.eventloop.time';
257
-
258
- export const NODEJS_MEMORY_HEAP_USAGE = 'nodejs.memory.v8_heap.usage';
259
- export const NODEJS_MEMORY_HEAP_TOTAL = 'nodejs.memory.v8_heap.total';
260
- export const NODEJS_MEMORY_NATIVE_USAGE = 'nodejs.memory.native.usage';
261
- export const NODEJS_MEMORY_BUFFER_USAGE = 'nodejs.memory.array_buffer.usage';
262
-
263
- export const TX_PROVIDER_TXS_FROM_PROPOSALS_COUNT = 'aztec.tx_collector.txs_from_proposal_count';
264
- export const TX_PROVIDER_TXS_FROM_MEMPOOL_COUNT = 'aztec.tx_collector.txs_from_mempool_count';
265
- export const TX_PROVIDER_TXS_FROM_P2P_COUNT = 'aztec.tx_collector.txs_from_p2p_count';
266
- export const TX_PROVIDER_MISSING_TXS_COUNT = 'aztec.tx_collector.missing_txs_count';
267
- export const TX_PROVIDER_P2P_TXS_REQUESTED_FRACTION = 'aztec.tx_collector.txs_requested_fraction';
268
- export const TX_PROVIDER_P2P_TXS_REQUEST_DELAY = 'aztec.tx_collector.txs_requested_delay';
269
-
270
- export const TX_COLLECTOR_COUNT = 'aztec.tx_collector.tx_count';
271
- export const TX_COLLECTOR_DURATION_PER_REQUEST = 'aztec.tx_collector.duration_per_request';
272
- export const TX_COLLECTOR_DURATION_PER_TX = 'aztec.tx_collector.duration_per_tx';
273
-
274
- export const IVC_VERIFIER_TIME = 'aztec.ivc_verifier.time';
275
- export const IVC_VERIFIER_TOTAL_TIME = 'aztec.ivc_verifier.total_time';
276
- export const IVC_VERIFIER_FAILURE_COUNT = 'aztec.ivc_verifier.failure_count';
277
-
278
- export const IVC_VERIFIER_AGG_DURATION_MIN = 'aztec.ivc_verifier.agg_duration_min';
279
- export const IVC_VERIFIER_AGG_DURATION_MAX = 'aztec.ivc_verifier.agg_duration_max';
280
- export const IVC_VERIFIER_AGG_DURATION_P50 = 'aztec.ivc_verifier.agg_duration_p50';
281
- export const IVC_VERIFIER_AGG_DURATION_P90 = 'aztec.ivc_verifier.agg_duration_p90';
282
- export const IVC_VERIFIER_AGG_DURATION_AVG = 'aztec.ivc_verifier.agg_duration_avg';
849
+ export const PUBLIC_EXECUTOR_SIMULATION_COUNT: MetricDefinition = {
850
+ name: 'aztec.public_executor.simulation_count',
851
+ description: 'Number of functions executed',
852
+ valueType: ValueType.INT,
853
+ };
854
+ export const PUBLIC_EXECUTOR_SIMULATION_DURATION: MetricDefinition = {
855
+ name: 'aztec.public_executor.simulation_duration',
856
+ description: 'How long it takes to execute a function',
857
+ unit: 'ms',
858
+ valueType: ValueType.INT,
859
+ };
860
+ export const PUBLIC_EXECUTOR_SIMULATION_MANA_PER_SECOND: MetricDefinition = {
861
+ name: 'aztec.public_executor.simulation_mana_per_second',
862
+ description: 'Mana used per second',
863
+ unit: 'mana/s',
864
+ valueType: ValueType.INT,
865
+ };
866
+ export const PUBLIC_EXECUTOR_SIMULATION_MANA_USED: MetricDefinition = {
867
+ name: 'aztec.public_executor.simulation_mana_used',
868
+ description: 'Total mana used',
869
+ unit: 'mana',
870
+ valueType: ValueType.INT,
871
+ };
872
+ export const PUBLIC_EXECUTOR_SIMULATION_TOTAL_INSTRUCTIONS: MetricDefinition = {
873
+ name: 'aztec.public_executor.simulation_total_instructions',
874
+ description: 'Total number of instructions executed',
875
+ valueType: ValueType.INT,
876
+ };
877
+ export const PUBLIC_EXECUTOR_TX_HASHING: MetricDefinition = {
878
+ name: 'aztec.public_executor.tx_hashing',
879
+ description: 'Tx hashing time',
880
+ unit: 'ms',
881
+ valueType: ValueType.INT,
882
+ };
883
+ export const PUBLIC_EXECUTOR_PRIVATE_EFFECTS_INSERTION: MetricDefinition = {
884
+ name: 'aztec.public_executor.private_effects_insertion',
885
+ description: 'Private effects insertion time',
886
+ unit: 'us',
887
+ valueType: ValueType.INT,
888
+ };
889
+ export const PUBLIC_EXECUTOR_SIMULATION_BYTECODE_SIZE: MetricDefinition = {
890
+ name: 'aztec.public_executor.simulation_bytecode_size',
891
+ description: 'Size of bytecode being executed',
892
+ unit: 'By',
893
+ valueType: ValueType.INT,
894
+ };
895
+
896
+ export const PROVING_ORCHESTRATOR_BASE_ROLLUP_INPUTS_DURATION: MetricDefinition = {
897
+ name: 'aztec.proving_orchestrator.base_rollup.inputs_duration',
898
+ description: 'Duration to build base rollup inputs',
899
+ unit: 'ms',
900
+ valueType: ValueType.INT,
901
+ };
902
+
903
+ export const PROVING_QUEUE_JOB_SIZE: MetricDefinition = {
904
+ name: 'aztec.proving_queue.job_size',
905
+ description: 'Size of proving jobs',
906
+ unit: 'By',
907
+ valueType: ValueType.INT,
908
+ };
909
+ export const PROVING_QUEUE_SIZE: MetricDefinition = {
910
+ name: 'aztec.proving_queue.size',
911
+ description: 'Number of jobs in the proving queue',
912
+ valueType: ValueType.INT,
913
+ };
914
+ export const PROVING_QUEUE_TOTAL_JOBS: MetricDefinition = {
915
+ name: 'aztec.proving_queue.enqueued_jobs_count',
916
+ description: 'Total number of jobs enqueued',
917
+ valueType: ValueType.INT,
918
+ };
919
+ export const PROVING_QUEUE_CACHED_JOBS: MetricDefinition = {
920
+ name: 'aztec.proving_queue.cached_jobs_count',
921
+ description: 'Number of cached proving jobs',
922
+ valueType: ValueType.INT,
923
+ };
924
+ export const PROVING_QUEUE_ACTIVE_JOBS: MetricDefinition = {
925
+ name: 'aztec.proving_queue.active_jobs_count',
926
+ description: 'Number of active proving jobs',
927
+ valueType: ValueType.INT,
928
+ };
929
+ export const PROVING_QUEUE_RESOLVED_JOBS: MetricDefinition = {
930
+ name: 'aztec.proving_queue.resolved_jobs_count',
931
+ description: 'Number of resolved proving jobs',
932
+ valueType: ValueType.INT,
933
+ };
934
+ export const PROVING_QUEUE_REJECTED_JOBS: MetricDefinition = {
935
+ name: 'aztec.proving_queue.rejected_jobs_count',
936
+ description: 'Number of rejected proving jobs',
937
+ valueType: ValueType.INT,
938
+ };
939
+ export const PROVING_QUEUE_RETRIED_JOBS: MetricDefinition = {
940
+ name: 'aztec.proving_queue.retried_jobs_count',
941
+ description: 'Number of retried proving jobs',
942
+ valueType: ValueType.INT,
943
+ };
944
+ export const PROVING_QUEUE_TIMED_OUT_JOBS: MetricDefinition = {
945
+ name: 'aztec.proving_queue.timed_out_jobs_count',
946
+ description: 'Number of timed out proving jobs',
947
+ valueType: ValueType.INT,
948
+ };
949
+ export const PROVING_QUEUE_JOB_WAIT: MetricDefinition = {
950
+ name: 'aztec.proving_queue.job_wait',
951
+ description: 'Records how long a job sits in the queue',
952
+ unit: 'ms',
953
+ valueType: ValueType.INT,
954
+ };
955
+ export const PROVING_QUEUE_JOB_DURATION: MetricDefinition = {
956
+ name: 'aztec.proving_queue.job_duration',
957
+ description: 'Records how long a job takes to complete',
958
+ unit: 'ms',
959
+ valueType: ValueType.INT,
960
+ };
961
+ export const PROVING_QUEUE_DB_NUM_ITEMS: MetricDefinition = {
962
+ name: 'aztec.proving_queue.db.num_items',
963
+ description: 'Number of items in the proving queue database',
964
+ valueType: ValueType.INT,
965
+ };
966
+ export const PROVING_QUEUE_DB_MAP_SIZE: MetricDefinition = {
967
+ name: 'aztec.proving_queue.db.map_size',
968
+ description: 'Map size of the proving queue database',
969
+ unit: 'By',
970
+ valueType: ValueType.INT,
971
+ };
972
+ export const PROVING_QUEUE_DB_USED_SIZE: MetricDefinition = {
973
+ name: 'aztec.proving_queue.db.used_size',
974
+ description: 'Used size of the proving queue database',
975
+ unit: 'By',
976
+ valueType: ValueType.INT,
977
+ };
978
+
979
+ export const PROVING_AGENT_IDLE: MetricDefinition = {
980
+ name: 'aztec.proving_queue.agent.idle',
981
+ description: 'Records how long an agent was idle',
982
+ unit: 's',
983
+ valueType: ValueType.DOUBLE,
984
+ };
985
+
986
+ export const PROVER_NODE_EXECUTION_DURATION: MetricDefinition = {
987
+ name: 'aztec.prover_node.execution.duration',
988
+ description: 'Duration of execution of an epoch by the prover',
989
+ unit: 'ms',
990
+ valueType: ValueType.INT,
991
+ };
992
+ export const PROVER_NODE_JOB_DURATION: MetricDefinition = {
993
+ name: 'aztec.prover_node.job_duration',
994
+ description: 'Duration of proving job',
995
+ unit: 's',
996
+ valueType: ValueType.DOUBLE,
997
+ };
998
+ export const PROVER_NODE_JOB_CHECKPOINTS: MetricDefinition = {
999
+ name: 'aztec.prover_node.job_checkpoints',
1000
+ description: 'Number of checkpoints in a proven epoch',
1001
+ valueType: ValueType.INT,
1002
+ };
1003
+ export const PROVER_NODE_JOB_BLOCKS: MetricDefinition = {
1004
+ name: 'aztec.prover_node.job_blocks',
1005
+ description: 'Number of blocks in a proven epoch',
1006
+ valueType: ValueType.INT,
1007
+ };
1008
+ export const PROVER_NODE_JOB_TRANSACTIONS: MetricDefinition = {
1009
+ name: 'aztec.prover_node.job_transactions',
1010
+ description: 'Number of transactions in a proven epoch',
1011
+ valueType: ValueType.INT,
1012
+ };
1013
+ export const PROVER_NODE_REWARDS_TOTAL: MetricDefinition = {
1014
+ name: 'aztec.prover_node.rewards_total',
1015
+ description: 'The rewards earned (total)',
1016
+ valueType: ValueType.DOUBLE,
1017
+ };
1018
+ export const PROVER_NODE_REWARDS_PER_EPOCH: MetricDefinition = {
1019
+ name: 'aztec.prover_node.rewards_per_epoch',
1020
+ description: 'The rewards earned',
1021
+ valueType: ValueType.DOUBLE,
1022
+ };
1023
+
1024
+ export const WORLD_STATE_FORK_DURATION: MetricDefinition = {
1025
+ name: 'aztec.world_state.fork.duration',
1026
+ description: 'Duration to fork world state',
1027
+ unit: 'ms',
1028
+ valueType: ValueType.INT,
1029
+ };
1030
+ export const WORLD_STATE_SYNC_DURATION: MetricDefinition = {
1031
+ name: 'aztec.world_state.sync.duration',
1032
+ description: 'Duration to sync world state',
1033
+ unit: 'ms',
1034
+ valueType: ValueType.INT,
1035
+ };
1036
+ export const WORLD_STATE_MERKLE_TREE_SIZE: MetricDefinition = {
1037
+ name: 'aztec.world_state.merkle_tree_size',
1038
+ description: 'Size of the merkle tree',
1039
+ valueType: ValueType.INT,
1040
+ };
1041
+ export const WORLD_STATE_DB_SIZE: MetricDefinition = {
1042
+ name: 'aztec.world_state.db_size',
1043
+ description: 'Size of the world state database',
1044
+ unit: 'By',
1045
+ valueType: ValueType.INT,
1046
+ };
1047
+ export const WORLD_STATE_DB_MAP_SIZE: MetricDefinition = {
1048
+ name: 'aztec.world_state.db_map_size',
1049
+ description: 'The current configured map size for each merkle tree',
1050
+ unit: 'By',
1051
+ valueType: ValueType.INT,
1052
+ };
1053
+ export const WORLD_STATE_DB_PHYSICAL_SIZE: MetricDefinition = {
1054
+ name: 'aztec.world_state.db_physical_size',
1055
+ description: 'The current physical disk space used for each database',
1056
+ unit: 'By',
1057
+ valueType: ValueType.INT,
1058
+ };
1059
+ export const WORLD_STATE_TREE_SIZE: MetricDefinition = {
1060
+ name: 'aztec.world_state.tree_size',
1061
+ description: 'The current number of leaves in each merkle tree',
1062
+ valueType: ValueType.INT,
1063
+ };
1064
+ export const WORLD_STATE_UNFINALIZED_HEIGHT: MetricDefinition = {
1065
+ name: 'aztec.world_state.unfinalized_height',
1066
+ description: 'The unfinalized block height of each merkle tree',
1067
+ valueType: ValueType.INT,
1068
+ };
1069
+ export const WORLD_STATE_FINALIZED_HEIGHT: MetricDefinition = {
1070
+ name: 'aztec.world_state.finalized_height',
1071
+ description: 'The finalized block height of each merkle tree',
1072
+ valueType: ValueType.INT,
1073
+ };
1074
+ export const WORLD_STATE_OLDEST_BLOCK: MetricDefinition = {
1075
+ name: 'aztec.world_state.oldest_block',
1076
+ description: 'The oldest historical block of each merkle tree',
1077
+ valueType: ValueType.INT,
1078
+ };
1079
+ export const WORLD_STATE_DB_USED_SIZE: MetricDefinition = {
1080
+ name: 'aztec.world_state.db_used_size',
1081
+ description: 'The current used database size for each db of each merkle tree',
1082
+ unit: 'By',
1083
+ valueType: ValueType.INT,
1084
+ };
1085
+ export const WORLD_STATE_DB_NUM_ITEMS: MetricDefinition = {
1086
+ name: 'aztec.world_state.db_num_items',
1087
+ description: 'The current number of items in each database of each merkle tree',
1088
+ valueType: ValueType.INT,
1089
+ };
1090
+ export const WORLD_STATE_REQUEST_TIME: MetricDefinition = {
1091
+ name: 'aztec.world_state.request_time',
1092
+ description: 'The round trip time of world state requests',
1093
+ unit: 'us',
1094
+ valueType: ValueType.INT,
1095
+ };
1096
+ export const WORLD_STATE_CRITICAL_ERROR_COUNT: MetricDefinition = {
1097
+ name: 'aztec.world_state.critical_error_count',
1098
+ description: 'The number of critical errors in the world state',
1099
+ valueType: ValueType.INT,
1100
+ };
1101
+
1102
+ export const PROOF_VERIFIER_COUNT: MetricDefinition = {
1103
+ name: 'aztec.proof_verifier.count',
1104
+ description: 'Number of proofs verified',
1105
+ valueType: ValueType.INT,
1106
+ };
1107
+
1108
+ export const VALIDATOR_RE_EXECUTION_TIME: MetricDefinition = {
1109
+ name: 'aztec.validator.re_execution_time',
1110
+ description: 'The time taken to re-execute a transaction',
1111
+ unit: 'ms',
1112
+ valueType: ValueType.INT,
1113
+ };
1114
+ export const VALIDATOR_RE_EXECUTION_MANA: MetricDefinition = {
1115
+ name: 'aztec.validator.re_execution_mana',
1116
+ description: 'The mana consumed by blocks',
1117
+ unit: 'Mmana',
1118
+ valueType: ValueType.DOUBLE,
1119
+ };
1120
+ export const VALIDATOR_RE_EXECUTION_TX_COUNT: MetricDefinition = {
1121
+ name: 'aztec.validator.re_execution_tx_count',
1122
+ description: 'The number of txs in a block proposal',
1123
+ unit: 'tx',
1124
+ valueType: ValueType.INT,
1125
+ };
1126
+
1127
+ export const VALIDATOR_FAILED_REEXECUTION_COUNT: MetricDefinition = {
1128
+ name: 'aztec.validator.failed_reexecution_count',
1129
+ description: 'The number of failed re-executions',
1130
+ valueType: ValueType.INT,
1131
+ };
1132
+ export const VALIDATOR_ATTESTATION_SUCCESS_COUNT: MetricDefinition = {
1133
+ name: 'aztec.validator.attestation_success_count',
1134
+ description: 'The number of successful attestations',
1135
+ valueType: ValueType.INT,
1136
+ };
1137
+ export const VALIDATOR_ATTESTATION_FAILED_BAD_PROPOSAL_COUNT: MetricDefinition = {
1138
+ name: 'aztec.validator.attestation_failed_bad_proposal_count',
1139
+ description: 'The number of failed attestations due to invalid block proposals',
1140
+ valueType: ValueType.INT,
1141
+ };
1142
+ export const VALIDATOR_ATTESTATION_FAILED_NODE_ISSUE_COUNT: MetricDefinition = {
1143
+ name: 'aztec.validator.attestation_failed_node_issue_count',
1144
+ description: 'The number of failed attestations due to node issues (timeout, missing data, etc.)',
1145
+ valueType: ValueType.INT,
1146
+ };
1147
+
1148
+ export const NODEJS_EVENT_LOOP_DELAY_MIN: MetricDefinition = {
1149
+ name: 'nodejs.eventloop.delay.min',
1150
+ description: 'Minimum delay of the event loop',
1151
+ unit: 'ns',
1152
+ valueType: ValueType.INT,
1153
+ };
1154
+ export const NODEJS_EVENT_LOOP_DELAY_MEAN: MetricDefinition = {
1155
+ name: 'nodejs.eventloop.delay.mean',
1156
+ description: 'Mean delay of the event loop',
1157
+ unit: 'ns',
1158
+ valueType: ValueType.INT,
1159
+ };
1160
+ export const NODEJS_EVENT_LOOP_DELAY_MAX: MetricDefinition = {
1161
+ name: 'nodejs.eventloop.delay.max',
1162
+ description: 'Max delay of the event loop',
1163
+ unit: 'ns',
1164
+ valueType: ValueType.INT,
1165
+ };
1166
+ export const NODEJS_EVENT_LOOP_DELAY_STDDEV: MetricDefinition = {
1167
+ name: 'nodejs.eventloop.delay.stddev',
1168
+ description: 'Stddev delay of the event loop',
1169
+ unit: 'ns',
1170
+ valueType: ValueType.INT,
1171
+ };
1172
+ export const NODEJS_EVENT_LOOP_DELAY_P50: MetricDefinition = {
1173
+ name: 'nodejs.eventloop.delay.p50',
1174
+ description: 'P50 delay of the event loop',
1175
+ unit: 'ns',
1176
+ valueType: ValueType.INT,
1177
+ };
1178
+ export const NODEJS_EVENT_LOOP_DELAY_P90: MetricDefinition = {
1179
+ name: 'nodejs.eventloop.delay.p90',
1180
+ description: 'P90 delay of the event loop',
1181
+ unit: 'ns',
1182
+ valueType: ValueType.INT,
1183
+ };
1184
+ export const NODEJS_EVENT_LOOP_DELAY_P99: MetricDefinition = {
1185
+ name: 'nodejs.eventloop.delay.p99',
1186
+ description: 'P99 delay of the event loop',
1187
+ unit: 'ns',
1188
+ valueType: ValueType.INT,
1189
+ };
1190
+
1191
+ export const NODEJS_EVENT_LOOP_UTILIZATION: MetricDefinition = {
1192
+ name: 'nodejs.eventloop.utilization',
1193
+ description: 'How busy is the event loop',
1194
+ valueType: ValueType.DOUBLE,
1195
+ };
1196
+ export const NODEJS_EVENT_LOOP_TIME: MetricDefinition = {
1197
+ name: 'nodejs.eventloop.time',
1198
+ description: 'How much time the event loop has spent in a given state',
1199
+ unit: 'ms',
1200
+ valueType: ValueType.INT,
1201
+ };
1202
+
1203
+ export const NODEJS_MEMORY_HEAP_USAGE: MetricDefinition = {
1204
+ name: 'nodejs.memory.v8_heap.usage',
1205
+ description: 'Memory used by the V8 heap',
1206
+ unit: 'By',
1207
+ };
1208
+ export const NODEJS_MEMORY_HEAP_TOTAL: MetricDefinition = {
1209
+ name: 'nodejs.memory.v8_heap.total',
1210
+ description: 'The max size the V8 heap can grow to',
1211
+ unit: 'By',
1212
+ };
1213
+ export const NODEJS_MEMORY_NATIVE_USAGE: MetricDefinition = {
1214
+ name: 'nodejs.memory.native.usage',
1215
+ description: 'Memory allocated for native C++ objects',
1216
+ unit: 'By',
1217
+ };
1218
+ export const NODEJS_MEMORY_BUFFER_USAGE: MetricDefinition = {
1219
+ name: 'nodejs.memory.array_buffer.usage',
1220
+ description: 'Memory allocated for buffers (includes native memory used)',
1221
+ unit: 'By',
1222
+ };
1223
+
1224
+ export const TX_PROVIDER_TXS_FROM_PROPOSALS_COUNT: MetricDefinition = {
1225
+ name: 'aztec.tx_collector.txs_from_proposal_count',
1226
+ description: 'The number of txs taken from block proposals',
1227
+ valueType: ValueType.INT,
1228
+ };
1229
+ export const TX_PROVIDER_TXS_FROM_MEMPOOL_COUNT: MetricDefinition = {
1230
+ name: 'aztec.tx_collector.txs_from_mempool_count',
1231
+ description: 'The number of txs taken from the local mempool',
1232
+ valueType: ValueType.INT,
1233
+ };
1234
+ export const TX_PROVIDER_TXS_FROM_P2P_COUNT: MetricDefinition = {
1235
+ name: 'aztec.tx_collector.txs_from_p2p_count',
1236
+ description: 'The number of txs taken from the p2p network',
1237
+ valueType: ValueType.INT,
1238
+ };
1239
+ export const TX_PROVIDER_MISSING_TXS_COUNT: MetricDefinition = {
1240
+ name: 'aztec.tx_collector.missing_txs_count',
1241
+ description: 'The number of txs not found anywhere',
1242
+ valueType: ValueType.INT,
1243
+ };
1244
+ export const TX_PROVIDER_P2P_TXS_REQUESTED_FRACTION: MetricDefinition = {
1245
+ name: 'aztec.tx_collector.txs_requested_fraction',
1246
+ description: 'The fraction of transaction requested from peers',
1247
+ valueType: ValueType.DOUBLE,
1248
+ };
1249
+ export const TX_PROVIDER_P2P_TXS_REQUEST_DELAY: MetricDefinition = {
1250
+ name: 'aztec.tx_collector.txs_requested_delay',
1251
+ description: 'The time it took to request missing transactions from p2p',
1252
+ unit: 'ms',
1253
+ valueType: ValueType.INT,
1254
+ };
1255
+
1256
+ export const TX_COLLECTOR_COUNT: MetricDefinition = {
1257
+ name: 'aztec.tx_collector.tx_count',
1258
+ description: 'The number of txs collected',
1259
+ valueType: ValueType.INT,
1260
+ };
1261
+ export const TX_COLLECTOR_DURATION_PER_REQUEST: MetricDefinition = {
1262
+ name: 'aztec.tx_collector.duration_per_request',
1263
+ description: 'Total duration of an individual tx collection request',
1264
+ unit: 'ms',
1265
+ valueType: ValueType.INT,
1266
+ };
1267
+ export const TX_COLLECTOR_DURATION_PER_TX: MetricDefinition = {
1268
+ name: 'aztec.tx_collector.duration_per_tx',
1269
+ description: 'Average duration per tx of an individual tx collection request',
1270
+ unit: 'ms',
1271
+ valueType: ValueType.INT,
1272
+ };
1273
+
1274
+ export const IVC_VERIFIER_TIME: MetricDefinition = {
1275
+ name: 'aztec.ivc_verifier.time',
1276
+ description: 'Duration to verify chonk proofs',
1277
+ unit: 'ms',
1278
+ valueType: ValueType.INT,
1279
+ };
1280
+ export const IVC_VERIFIER_TOTAL_TIME: MetricDefinition = {
1281
+ name: 'aztec.ivc_verifier.total_time',
1282
+ description: 'Total duration to verify chonk proofs, including serde',
1283
+ unit: 'ms',
1284
+ valueType: ValueType.INT,
1285
+ };
1286
+ export const IVC_VERIFIER_FAILURE_COUNT: MetricDefinition = {
1287
+ name: 'aztec.ivc_verifier.failure_count',
1288
+ description: 'Count of failed IVC proof verifications',
1289
+ valueType: ValueType.INT,
1290
+ };
1291
+
1292
+ export const IVC_VERIFIER_AGG_DURATION_MIN: MetricDefinition = {
1293
+ name: 'aztec.ivc_verifier.agg_duration_min',
1294
+ description: 'MIN ivc verification',
1295
+ unit: 'ms',
1296
+ valueType: ValueType.DOUBLE,
1297
+ };
1298
+ export const IVC_VERIFIER_AGG_DURATION_MAX: MetricDefinition = {
1299
+ name: 'aztec.ivc_verifier.agg_duration_max',
1300
+ description: 'MAX ivc verification',
1301
+ unit: 'ms',
1302
+ valueType: ValueType.DOUBLE,
1303
+ };
1304
+ export const IVC_VERIFIER_AGG_DURATION_P50: MetricDefinition = {
1305
+ name: 'aztec.ivc_verifier.agg_duration_p50',
1306
+ description: 'P50 ivc verification',
1307
+ unit: 'ms',
1308
+ valueType: ValueType.DOUBLE,
1309
+ };
1310
+ export const IVC_VERIFIER_AGG_DURATION_P90: MetricDefinition = {
1311
+ name: 'aztec.ivc_verifier.agg_duration_p90',
1312
+ description: 'P90 ivc verification',
1313
+ unit: 'ms',
1314
+ valueType: ValueType.DOUBLE,
1315
+ };
1316
+ export const IVC_VERIFIER_AGG_DURATION_AVG: MetricDefinition = {
1317
+ name: 'aztec.ivc_verifier.agg_duration_avg',
1318
+ description: 'AVG ivc verification',
1319
+ unit: 'ms',
1320
+ valueType: ValueType.DOUBLE,
1321
+ };