@aztec/telemetry-client 0.0.1-commit.f2ce05ee → 0.0.1-commit.f5a9928

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.
Files changed (62) hide show
  1. package/dest/attributes.d.ts +22 -2
  2. package/dest/attributes.d.ts.map +1 -1
  3. package/dest/attributes.js +11 -1
  4. package/dest/config.d.ts +3 -1
  5. package/dest/config.d.ts.map +1 -1
  6. package/dest/config.js +17 -9
  7. package/dest/index.d.ts +2 -1
  8. package/dest/index.d.ts.map +1 -1
  9. package/dest/index.js +1 -0
  10. package/dest/json_rpc_server_metrics.d.ts +27 -0
  11. package/dest/json_rpc_server_metrics.d.ts.map +1 -0
  12. package/dest/json_rpc_server_metrics.js +154 -0
  13. package/dest/lmdb_metrics.d.ts +2 -2
  14. package/dest/lmdb_metrics.d.ts.map +1 -1
  15. package/dest/metrics.d.ts +84 -5
  16. package/dest/metrics.d.ts.map +1 -1
  17. package/dest/metrics.js +450 -19
  18. package/dest/monitored_batch_span_processor.d.ts +29 -0
  19. package/dest/monitored_batch_span_processor.d.ts.map +1 -0
  20. package/dest/monitored_batch_span_processor.js +75 -0
  21. package/dest/otel.d.ts +6 -1
  22. package/dest/otel.d.ts.map +1 -1
  23. package/dest/otel.js +99 -4
  24. package/dest/otel_propagation.d.ts +4 -1
  25. package/dest/otel_propagation.d.ts.map +1 -1
  26. package/dest/otel_propagation.js +64 -6
  27. package/dest/start.d.ts +1 -1
  28. package/dest/start.d.ts.map +1 -1
  29. package/dest/start.js +1 -1
  30. package/dest/telemetry.d.ts +5 -3
  31. package/dest/telemetry.d.ts.map +1 -1
  32. package/dest/vendor/attributes.d.ts +2 -1
  33. package/dest/vendor/attributes.d.ts.map +1 -1
  34. package/dest/vendor/attributes.js +1 -0
  35. package/dest/wrappers/fetch.d.ts +3 -3
  36. package/dest/wrappers/fetch.d.ts.map +1 -1
  37. package/dest/wrappers/fetch.js +3 -2
  38. package/dest/wrappers/index.d.ts +1 -2
  39. package/dest/wrappers/index.d.ts.map +1 -1
  40. package/dest/wrappers/index.js +0 -1
  41. package/dest/wrappers/json_rpc_server.d.ts +1 -1
  42. package/dest/wrappers/json_rpc_server.d.ts.map +1 -1
  43. package/dest/wrappers/json_rpc_server.js +6 -1
  44. package/package.json +3 -3
  45. package/src/attributes.ts +29 -1
  46. package/src/config.ts +24 -9
  47. package/src/index.ts +1 -0
  48. package/src/json_rpc_server_metrics.ts +151 -0
  49. package/src/metrics.ts +473 -19
  50. package/src/monitored_batch_span_processor.ts +100 -0
  51. package/src/otel.ts +69 -3
  52. package/src/otel_propagation.ts +63 -5
  53. package/src/start.ts +6 -1
  54. package/src/telemetry.ts +6 -2
  55. package/src/vendor/attributes.ts +1 -0
  56. package/src/wrappers/fetch.ts +9 -3
  57. package/src/wrappers/index.ts +0 -1
  58. package/src/wrappers/json_rpc_server.ts +13 -2
  59. package/dest/wrappers/l2_block_stream.d.ts +0 -16
  60. package/dest/wrappers/l2_block_stream.d.ts.map +0 -1
  61. package/dest/wrappers/l2_block_stream.js +0 -400
  62. package/src/wrappers/l2_block_stream.ts +0 -41
package/dest/metrics.js CHANGED
@@ -5,6 +5,45 @@
5
5
  *
6
6
  * @see {@link https://opentelemetry.io/docs/specs/semconv/general/metrics/ | OpenTelemetry Metrics} for naming conventions.
7
7
  */ import { ValueType } from '@opentelemetry/api';
8
+ export const JSON_RPC_SERVER_REQUEST_COUNT = {
9
+ name: 'aztec.json_rpc.server.request_count',
10
+ description: 'Number of completed JSON-RPC server requests',
11
+ valueType: ValueType.INT
12
+ };
13
+ export const JSON_RPC_SERVER_REQUEST_DURATION = {
14
+ name: 'aztec.json_rpc.server.request_duration',
15
+ description: 'JSON-RPC server request handler duration',
16
+ unit: 'ms',
17
+ valueType: ValueType.DOUBLE
18
+ };
19
+ export const JSON_RPC_SERVER_REQUEST_VALIDATION_DURATION = {
20
+ name: 'aztec.json_rpc.server.request_validation_duration',
21
+ description: 'JSON-RPC server request parameter validation duration',
22
+ unit: 'ms',
23
+ valueType: ValueType.DOUBLE
24
+ };
25
+ export const JSON_RPC_SERVER_REJECTED_REQUEST_COUNT = {
26
+ name: 'aztec.json_rpc.server.rejected_request_count',
27
+ description: 'Number of JSON-RPC requests rejected before handler dispatch',
28
+ valueType: ValueType.INT
29
+ };
30
+ export const JSON_RPC_SERVER_BATCH_COUNT = {
31
+ name: 'aztec.json_rpc.server.batch_count',
32
+ description: 'Number of JSON-RPC batches received',
33
+ valueType: ValueType.INT
34
+ };
35
+ export const JSON_RPC_SERVER_BATCH_DURATION = {
36
+ name: 'aztec.json_rpc.server.batch_duration',
37
+ description: 'JSON-RPC batch processing duration',
38
+ unit: 'ms',
39
+ valueType: ValueType.DOUBLE
40
+ };
41
+ export const JSON_RPC_SERVER_BATCH_SIZE = {
42
+ name: 'aztec.json_rpc.server.batch_size',
43
+ description: 'Number of requests in a JSON-RPC batch',
44
+ unit: 'requests',
45
+ valueType: ValueType.INT
46
+ };
8
47
  export const BLOB_SINK_STORE_REQUESTS = {
9
48
  name: 'aztec.blob_sink.store_request_count',
10
49
  description: 'Number of blob store requests',
@@ -128,10 +167,73 @@ export const MEMPOOL_TX_ADDED_COUNT = {
128
167
  };
129
168
  export const MEMPOOL_TX_MINED_DELAY = {
130
169
  name: 'aztec.mempool.tx_mined_delay',
131
- description: 'Delay between transaction added and evicted from the mempool',
170
+ description: 'Delay (ms) from a transaction being received into the pool to being mined',
171
+ unit: 'ms',
172
+ valueType: ValueType.INT
173
+ };
174
+ export const MEMPOOL_TX_POOL_V2_EVICTED_COUNT = {
175
+ name: 'aztec.mempool.tx_pool_v2.evicted_count',
176
+ description: 'The number of transactions evicted from the tx pool',
177
+ valueType: ValueType.INT
178
+ };
179
+ export const MEMPOOL_TX_POOL_V2_IGNORED_COUNT = {
180
+ name: 'aztec.mempool.tx_pool_v2.ignored_count',
181
+ description: 'The number of transactions ignored in addPendingTxs',
182
+ valueType: ValueType.INT
183
+ };
184
+ export const MEMPOOL_TX_POOL_V2_REJECTED_COUNT = {
185
+ name: 'aztec.mempool.tx_pool_v2.rejected_count',
186
+ description: 'The number of transactions rejected in addPendingTxs',
187
+ valueType: ValueType.INT
188
+ };
189
+ export const MEMPOOL_TX_POOL_V2_SOFT_DELETED_HITS = {
190
+ name: 'aztec.mempool.tx_pool_v2.soft_deleted_hits',
191
+ description: 'The number of transactions found in the soft-deleted pool',
192
+ valueType: ValueType.INT
193
+ };
194
+ export const MEMPOOL_TX_POOL_V2_MISSING_ON_PROTECT = {
195
+ name: 'aztec.mempool.tx_pool_v2.missing_on_protect',
196
+ description: 'The number of truly missing transactions in protectTxs',
197
+ valueType: ValueType.INT
198
+ };
199
+ export const MEMPOOL_TX_POOL_V2_MISSING_PREVIOUSLY_EVICTED = {
200
+ name: 'aztec.mempool.tx_pool_v2.missing_previously_evicted',
201
+ description: 'The number of truly missing transactions in protectTxs that were previously evicted',
202
+ valueType: ValueType.INT
203
+ };
204
+ export const MEMPOOL_TX_POOL_V2_METADATA_MEMORY = {
205
+ name: 'aztec.mempool.tx_pool_v2.metadata_memory',
206
+ description: 'Estimated total memory consumed by in-memory transaction metadata',
207
+ unit: 'By',
208
+ valueType: ValueType.INT
209
+ };
210
+ export const MEMPOOL_TX_POOL_V2_QUEUE_WAIT = {
211
+ name: 'aztec.mempool.tx_pool_v2.queue_wait',
212
+ description: 'Time an operation waits in the tx pool serial queue before executing, keyed by mempool.operation',
132
213
  unit: 'ms',
133
214
  valueType: ValueType.INT
134
215
  };
216
+ export const MEMPOOL_TX_POOL_V2_QUEUE_EXECUTION = {
217
+ name: 'aztec.mempool.tx_pool_v2.queue_execution',
218
+ description: 'Time an operation spends executing in the tx pool serial queue, keyed by mempool.operation',
219
+ unit: 'ms',
220
+ valueType: ValueType.INT
221
+ };
222
+ export const MEMPOOL_TX_POOL_V2_QUEUE_LENGTH = {
223
+ name: 'aztec.mempool.tx_pool_v2.queue_length',
224
+ description: 'Number of operations waiting in the tx pool serial queue',
225
+ valueType: ValueType.INT
226
+ };
227
+ export const MEMPOOL_TX_POOL_V2_DUPLICATE_ADD = {
228
+ name: 'aztec.mempool.tx_pool_v2.duplicate_add',
229
+ description: 'Transactions received via addPendingTxs that were already in the pool',
230
+ valueType: ValueType.INT
231
+ };
232
+ export const MEMPOOL_TX_POOL_V2_ALREADY_PROTECTED_ADD = {
233
+ name: 'aztec.mempool.tx_pool_v2.already_protected_add',
234
+ description: 'Transactions received via addPendingTxs that were already pre-protected',
235
+ valueType: ValueType.INT
236
+ };
135
237
  export const DB_NUM_ITEMS = {
136
238
  name: 'aztec.db.num_items',
137
239
  description: 'LMDB Num Items',
@@ -187,6 +289,11 @@ export const ARCHIVER_BLOCK_HEIGHT = {
187
289
  description: 'The height of the latest block processed by the archiver',
188
290
  valueType: ValueType.INT
189
291
  };
292
+ export const ARCHIVER_CHECKPOINT_HEIGHT = {
293
+ name: 'aztec.archiver.checkpoint_height',
294
+ description: 'The height of the latest checkpoint processed by the archiver',
295
+ valueType: ValueType.INT
296
+ };
190
297
  export const ARCHIVER_ROLLUP_PROOF_DELAY = {
191
298
  name: 'aztec.archiver.rollup_proof_delay',
192
299
  description: 'Time after a block is submitted until its proof is published',
@@ -216,6 +323,12 @@ export const ARCHIVER_SYNC_PER_BLOCK = {
216
323
  unit: 'ms',
217
324
  valueType: ValueType.INT
218
325
  };
326
+ export const ARCHIVER_SYNC_PER_CHECKPOINT = {
327
+ name: 'aztec.archiver.checkpoint.sync_per_item_duration',
328
+ description: 'Duration to sync a checkpoint',
329
+ unit: 'ms',
330
+ valueType: ValueType.INT
331
+ };
219
332
  export const ARCHIVER_SYNC_BLOCK_COUNT = {
220
333
  name: 'aztec.archiver.block.sync_count',
221
334
  description: 'Number of blocks synced from L1',
@@ -240,7 +353,7 @@ export const ARCHIVER_PRUNE_DURATION = {
240
353
  };
241
354
  export const ARCHIVER_PRUNE_COUNT = {
242
355
  name: 'aztec.archiver.prune_count',
243
- description: 'Number of prunes detected',
356
+ description: 'Number of prunes detected, dimensioned by prune_type: unproven (epoch prune of checkpoints that will not be proven), uncheckpointed (proposed blocks whose slot ended without a checkpoint), l1_conflict (proposed blocks conflicting with an L1 checkpoint), orphan (proposed blocks whose matching proposed checkpoint never arrived before the deadline), and l1_mismatch (the local checkpointed tip diverged from L1 — an L1 reorg or a pruned/missed-proof checkpoint — rewinding already-checkpointed blocks).',
244
357
  valueType: ValueType.INT
245
358
  };
246
359
  export const ARCHIVER_TOTAL_TXS = {
@@ -253,6 +366,17 @@ export const ARCHIVER_BLOCK_PROPOSAL_TX_TARGET_COUNT = {
253
366
  description: 'Number of block proposals by tx target',
254
367
  valueType: ValueType.INT
255
368
  };
369
+ export const ARCHIVER_CHECKPOINT_L1_INCLUSION_DELAY = {
370
+ name: 'aztec.archiver.checkpoint_l1_inclusion_delay',
371
+ description: 'Seconds into the L2 slot when the checkpoint L1 tx was included',
372
+ unit: 's',
373
+ valueType: ValueType.INT
374
+ };
375
+ export const ARCHIVER_CHECKPOINT_PROMOTED_COUNT = {
376
+ name: 'aztec.archiver.checkpoint_promoted_count',
377
+ description: 'Number of checkpoints promoted from proposed (blob fetch skipped)',
378
+ valueType: ValueType.INT
379
+ };
256
380
  export const NODE_RECEIVE_TX_DURATION = {
257
381
  name: 'aztec.node.receive_tx.duration',
258
382
  description: 'The duration of the receiveTx method',
@@ -281,6 +405,12 @@ export const SEQUENCER_STATE_TRANSITION_BUFFER_DURATION = {
281
405
  unit: 'ms',
282
406
  valueType: ValueType.INT
283
407
  };
408
+ export const SEQUENCER_STATE_DURATION = {
409
+ name: 'aztec.sequencer.state_duration',
410
+ description: 'Wall-clock time spent in each sequencer state, labelled by the state being left',
411
+ unit: 'ms',
412
+ valueType: ValueType.INT
413
+ };
284
414
  export const SEQUENCER_BLOCK_BUILD_DURATION = {
285
415
  name: 'aztec.sequencer.block.build_duration',
286
416
  description: 'Duration to build a block',
@@ -298,9 +428,15 @@ export const SEQUENCER_BLOCK_COUNT = {
298
428
  description: 'Number of blocks built by this sequencer',
299
429
  valueType: ValueType.INT
300
430
  };
301
- export const SEQUENCER_CURRENT_BLOCK_REWARDS = {
302
- name: 'aztec.sequencer.current_block_rewards',
303
- description: 'The rewards earned',
431
+ export const SEQUENCER_BLOCK_INTER_BLOCK_TIME = {
432
+ name: 'aztec.sequencer.block.inter_block_time',
433
+ description: 'Wall-clock time elapsed between consecutive blocks being built by this sequencer',
434
+ unit: 'ms',
435
+ valueType: ValueType.INT
436
+ };
437
+ export const SEQUENCER_CURRENT_SLOT_REWARDS = {
438
+ name: 'aztec.sequencer.current_slot_rewards',
439
+ description: 'The rewards earned per filled slot',
304
440
  valueType: ValueType.DOUBLE
305
441
  };
306
442
  export const SEQUENCER_SLOT_COUNT = {
@@ -321,12 +457,12 @@ export const SEQUENCER_CHECKPOINT_ATTESTATION_DELAY = {
321
457
  };
322
458
  export const SEQUENCER_COLLECTED_ATTESTATIONS_COUNT = {
323
459
  name: 'aztec.sequencer.attestations.collected_count',
324
- description: 'The number of attestations collected for a block proposal',
460
+ description: 'The number of attestations collected for a checkpoint proposal',
325
461
  valueType: ValueType.INT
326
462
  };
327
463
  export const SEQUENCER_REQUIRED_ATTESTATIONS_COUNT = {
328
464
  name: 'aztec.sequencer.attestations.required_count',
329
- description: 'The minimum number of attestations required to publish a block',
465
+ description: 'The minimum number of attestations required to publish a checkpoint',
330
466
  valueType: ValueType.INT
331
467
  };
332
468
  export const SEQUENCER_COLLECT_ATTESTATIONS_DURATION = {
@@ -346,14 +482,60 @@ export const SEQUENCER_BLOCK_PROPOSAL_FAILED_COUNT = {
346
482
  description: 'The number of times block proposal failed (including validation builds)',
347
483
  valueType: ValueType.INT
348
484
  };
349
- export const SEQUENCER_BLOCK_PROPOSAL_SUCCESS_COUNT = {
350
- name: 'aztec.sequencer.block.proposal_success_count',
351
- description: 'The number of times block proposal succeeded (including validation builds)',
485
+ export const SEQUENCER_CHECKPOINT_PROPOSAL_SUCCESS_COUNT = {
486
+ name: 'aztec.sequencer.checkpoint.proposal_success_count',
487
+ description: 'The number of times checkpoint proposal succeeded',
488
+ valueType: ValueType.INT
489
+ };
490
+ export const SEQUENCER_CHECKPOINT_PRECHECK_FAILED_COUNT = {
491
+ name: 'aztec.sequencer.checkpoint.precheck_failed_count',
492
+ description: 'The number of times checkpoint pre-build checks failed',
493
+ valueType: ValueType.INT
494
+ };
495
+ export const SEQUENCER_CHECKPOINT_PROPOSAL_FAILED_COUNT = {
496
+ name: 'aztec.sequencer.checkpoint.proposal_failed_count',
497
+ description: 'The number of times checkpoint proposal failed',
498
+ valueType: ValueType.INT
499
+ };
500
+ export const SEQUENCER_CHECKPOINT_BUILD_DURATION = {
501
+ name: 'aztec.sequencer.checkpoint.build_duration',
502
+ description: 'Total duration to build all blocks in a checkpoint',
503
+ unit: 'ms',
504
+ valueType: ValueType.INT
505
+ };
506
+ export const SEQUENCER_CHECKPOINT_START_TO_FIRST_BLOCK_DURATION = {
507
+ name: 'aztec.sequencer.checkpoint.start_to_first_block_duration',
508
+ description: 'Time from starting checkpoint work to the first block finishing build',
509
+ unit: 'ms',
510
+ valueType: ValueType.INT
511
+ };
512
+ export const SEQUENCER_CHECKPOINT_LAST_BLOCK_TO_BROADCAST_DURATION = {
513
+ name: 'aztec.sequencer.checkpoint.last_block_to_broadcast_duration',
514
+ description: 'Time from the final block finishing build to the checkpoint proposal being broadcast',
515
+ unit: 'ms',
516
+ valueType: ValueType.INT
517
+ };
518
+ export const SEQUENCER_PIPELINED_CHECKPOINT_BUILD_START_OFFSET_FROM_SLOT_BOUNDARY = {
519
+ name: 'aztec.sequencer.pipelined_checkpoint.build_start_offset_from_slot_boundary',
520
+ description: 'Absolute offset from the wall-clock slot boundary when a pipelined checkpoint build starts. Use aztec.slot_boundary_side to distinguish before vs after the boundary.',
521
+ unit: 'ms',
352
522
  valueType: ValueType.INT
353
523
  };
354
- export const SEQUENCER_BLOCK_PROPOSAL_PRECHECK_FAILED_COUNT = {
355
- name: 'aztec.sequencer.block.proposal_precheck_failed_count',
356
- description: 'The number of times block proposal pre-build checks failed',
524
+ export const SEQUENCER_CHECKPOINT_BLOCK_COUNT = {
525
+ name: 'aztec.sequencer.checkpoint.block_count',
526
+ description: 'Number of blocks built in a checkpoint',
527
+ valueType: ValueType.INT
528
+ };
529
+ export const SEQUENCER_CHECKPOINT_TX_COUNT = {
530
+ name: 'aztec.sequencer.checkpoint.tx_count',
531
+ description: 'Total number of transactions across all blocks in a checkpoint',
532
+ unit: 'tx',
533
+ valueType: ValueType.INT
534
+ };
535
+ export const SEQUENCER_CHECKPOINT_TOTAL_MANA = {
536
+ name: 'aztec.sequencer.checkpoint.total_mana',
537
+ description: 'Total L2 mana used across all blocks in a checkpoint',
538
+ unit: 'mana',
357
539
  valueType: ValueType.INT
358
540
  };
359
541
  export const SEQUENCER_SLASHING_ATTEMPTS_COUNT = {
@@ -361,11 +543,57 @@ export const SEQUENCER_SLASHING_ATTEMPTS_COUNT = {
361
543
  description: 'The number of slashing action attempts',
362
544
  valueType: ValueType.INT
363
545
  };
546
+ export const SLASHER_ROUND_EXECUTED_COUNT = {
547
+ name: 'aztec.slasher.round.executed_count',
548
+ description: 'The number of slashing rounds executed',
549
+ valueType: ValueType.INT
550
+ };
551
+ export const SLASHER_OWN_VALIDATOR_TARGETED_COUNT = {
552
+ name: 'aztec.slasher.own_validator.targeted_count',
553
+ description: "The number of times one of the node's own validators was named as a slash target by an onchain vote, counted " + 'once per vote per validator. Votes cast while the node is offline or starting up are not counted, and L1 ' + 'reorgs can cause small drift within a round.',
554
+ valueType: ValueType.INT
555
+ };
556
+ export const SLASHER_OWN_VALIDATOR_CURRENT_ROUND_VOTES_MAX = {
557
+ name: 'aztec.slasher.own_validator.current_round_votes_max',
558
+ description: "Highest number of votes cast against any committee position held by the node's own validators in the current " + 'slashing round, to compare against aztec.slasher.quorum_size (the contract tallies quorum per position). ' + 'Resets to zero when a new round starts. Votes cast while the node is offline or starting up are not counted, ' + 'and L1 reorgs can cause small drift within a round.',
559
+ valueType: ValueType.INT
560
+ };
561
+ export const SLASHER_QUORUM_SIZE = {
562
+ name: 'aztec.slasher.quorum_size',
563
+ description: 'The number of votes a validator must receive in a round to be slashed',
564
+ valueType: ValueType.INT
565
+ };
566
+ export const SLASHER_OWN_VALIDATOR_SLASHED_COUNT = {
567
+ name: 'aztec.slasher.own_validator.slashed_count',
568
+ description: "The number of times one of the node's own validators was slashed, from executed Slashed events",
569
+ valueType: ValueType.INT
570
+ };
571
+ export const SLASHER_OWN_VALIDATOR_SLASHED_AMOUNT = {
572
+ name: 'aztec.slasher.own_validator.slashed_amount',
573
+ description: "Cumulative amount slashed from the node's own validators in whole staking-asset tokens, from executed " + 'Slashed events',
574
+ unit: 'tokens',
575
+ valueType: ValueType.DOUBLE
576
+ };
364
577
  export const SEQUENCER_CHECKPOINT_SUCCESS_COUNT = {
365
578
  name: 'aztec.sequencer.checkpoint.success_count',
366
579
  description: 'The number of times checkpoint publishing succeeded',
367
580
  valueType: ValueType.INT
368
581
  };
582
+ export const SEQUENCER_PIPELINE_DEPTH = {
583
+ name: 'aztec.sequencer.pipeline.depth',
584
+ description: 'Current pipeline depth when builder pipelining is enabled',
585
+ valueType: ValueType.INT
586
+ };
587
+ export const SEQUENCER_PIPELINE_DISCARDS_COUNT = {
588
+ name: 'aztec.sequencer.pipeline.discards_count',
589
+ description: 'The number of times a pipeline was discarded',
590
+ valueType: ValueType.INT
591
+ };
592
+ export const SEQUENCER_PIPELINE_PARENT_CHECKPOINT_MISMATCH_COUNT = {
593
+ name: 'aztec.sequencer.pipeline.parent_checkpoint_mismatch_count',
594
+ description: 'The number of times a pipelined checkpoint was discarded because the parent did not match expectations',
595
+ valueType: ValueType.INT
596
+ };
369
597
  // Fisherman fee analysis metrics
370
598
  export const FISHERMAN_FEE_ANALYSIS_WOULD_BE_INCLUDED = {
371
599
  name: 'aztec.fisherman.fee_analysis.would_be_included',
@@ -424,6 +652,29 @@ export const FISHERMAN_FEE_ANALYSIS_MINED_BLOB_TX_TOTAL_COST = {
424
652
  unit: 'eth',
425
653
  valueType: ValueType.DOUBLE
426
654
  };
655
+ export const FISHERMAN_FEE_ANALYSIS_PENDING_BLOB_COUNT = {
656
+ name: 'aztec.fisherman.fee_analysis.pending_blob_count',
657
+ description: 'Total number of blobs in pending blob transactions',
658
+ unit: 'blobs',
659
+ valueType: ValueType.INT
660
+ };
661
+ export const FISHERMAN_FEE_ANALYSIS_INCLUDED_BLOB_COUNT = {
662
+ name: 'aztec.fisherman.fee_analysis.included_blob_count',
663
+ description: 'Total number of blobs included in the mined block',
664
+ unit: 'blobs',
665
+ valueType: ValueType.INT
666
+ };
667
+ export const FISHERMAN_FEE_ANALYSIS_BLOCK_BLOBS_FULL = {
668
+ name: 'aztec.fisherman.fee_analysis.block_blobs_full',
669
+ description: 'Whether the mined block reached 100% blob capacity',
670
+ valueType: ValueType.INT
671
+ };
672
+ export const FISHERMAN_FEE_ANALYSIS_MAX_BLOB_CAPACITY = {
673
+ name: 'aztec.fisherman.fee_analysis.max_blob_capacity',
674
+ description: 'Maximum blob capacity for the analyzed block based on L1 upgrade schedule',
675
+ unit: 'blobs',
676
+ valueType: ValueType.INT
677
+ };
427
678
  export const VALIDATOR_INVALID_ATTESTATION_RECEIVED_COUNT = {
428
679
  name: 'aztec.validator.invalid_attestation_received_count',
429
680
  description: 'Number of invalid attestations received',
@@ -507,6 +758,24 @@ export const L1_PUBLISHER_TX_TOTAL_FEE = {
507
758
  unit: 'eth',
508
759
  valueType: ValueType.DOUBLE
509
760
  };
761
+ export const PROVER_NODE_ESTIMATED_SUBMISSION_GAS = {
762
+ name: 'aztec.prover_node.estimated_submission.gas',
763
+ description: 'Estimated gas for a proof submission tx (proof publishing disabled, not actually sent)',
764
+ unit: 'gas',
765
+ valueType: ValueType.INT
766
+ };
767
+ export const PROVER_NODE_ESTIMATED_SUBMISSION_GAS_PRICE = {
768
+ name: 'aztec.prover_node.estimated_submission.gas_price',
769
+ description: 'Estimated effective gas price for a proof submission tx (proof publishing disabled, not actually sent)',
770
+ unit: 'gwei',
771
+ valueType: ValueType.DOUBLE
772
+ };
773
+ export const PROVER_NODE_ESTIMATED_SUBMISSION_TOTAL_FEE = {
774
+ name: 'aztec.prover_node.estimated_submission.total_fee',
775
+ description: 'Estimated total L1 fee for a proof submission tx (proof publishing disabled, not actually sent)',
776
+ unit: 'eth',
777
+ valueType: ValueType.DOUBLE
778
+ };
510
779
  export const L1_BLOCK_HEIGHT = {
511
780
  name: 'aztec.l1.block_height',
512
781
  description: 'The current L1 block height',
@@ -597,6 +866,12 @@ export const PEER_MANAGER_PEER_COUNT = {
597
866
  unit: 'peers',
598
867
  valueType: ValueType.INT
599
868
  };
869
+ export const PEER_MANAGER_HEALTHY_PEER_COUNT = {
870
+ name: 'aztec.peer_manager.healthy_peer_count',
871
+ description: 'Number of healthy (non-protected, non-banned) peers',
872
+ unit: 'peers',
873
+ valueType: ValueType.INT
874
+ };
600
875
  export const PEER_MANAGER_LOW_SCORE_DISCONNECTS = {
601
876
  name: 'aztec.peer_manager.low_score_disconnects',
602
877
  description: 'Number of peers disconnected due to low score',
@@ -721,6 +996,17 @@ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_AVG = {
721
996
  unit: 'ms',
722
997
  valueType: ValueType.INT
723
998
  };
999
+ export const P2P_GOSSIP_SLOW_VALIDATION_COUNT = {
1000
+ name: 'aztec.p2p.gossip.slow_validation_count',
1001
+ description: 'Number of gossip validations that exceeded 75% of the mcache eviction window',
1002
+ valueType: ValueType.INT
1003
+ };
1004
+ export const P2P_GOSSIP_TX_VALIDATION_STAGE_DURATION = {
1005
+ name: 'aztec.p2p.gossip.tx_validation_stage_duration',
1006
+ description: 'Duration of each stage of gossiped tx validation, keyed by the tx_validation_stage attribute',
1007
+ unit: 'ms',
1008
+ valueType: ValueType.INT
1009
+ };
724
1010
  export const PUBLIC_PROCESSOR_TX_DURATION = {
725
1011
  name: 'aztec.public_processor.tx_duration',
726
1012
  description: 'Duration to process a public transaction',
@@ -784,6 +1070,17 @@ export const PUBLIC_PROCESSOR_TREE_INSERTION = {
784
1070
  unit: 'ms',
785
1071
  valueType: ValueType.INT
786
1072
  };
1073
+ export const PUBLIC_PROCESSOR_SILENTLY_SKIPPED_COUNT = {
1074
+ name: 'aztec.public_processor.silently_skipped_count',
1075
+ description: 'Public txs fully processed then skipped (e.g. blob-field limit); not counted as processed or failed',
1076
+ valueType: ValueType.INT
1077
+ };
1078
+ export const PUBLIC_PROCESSOR_SILENTLY_SKIPPED_DURATION = {
1079
+ name: 'aztec.public_processor.silently_skipped_duration',
1080
+ description: 'Wall-clock time spent processing txs that were then silently skipped',
1081
+ unit: 'ms',
1082
+ valueType: ValueType.INT
1083
+ };
787
1084
  export const PUBLIC_EXECUTOR_PREFIX = 'aztec.public_executor.';
788
1085
  export const PUBLIC_EXECUTOR_SIMULATION_COUNT = {
789
1086
  name: 'aztec.public_executor.simulation_count',
@@ -873,6 +1170,11 @@ export const PROVING_QUEUE_REJECTED_JOBS = {
873
1170
  description: 'Number of rejected proving jobs',
874
1171
  valueType: ValueType.INT
875
1172
  };
1173
+ export const PROVING_QUEUE_ABORTED_JOBS = {
1174
+ name: 'aztec.proving_queue.aborted_jobs_count',
1175
+ description: 'Number of aborted proving jobs',
1176
+ valueType: ValueType.INT
1177
+ };
876
1178
  export const PROVING_QUEUE_RETRIED_JOBS = {
877
1179
  name: 'aztec.proving_queue.retried_jobs_count',
878
1180
  description: 'Number of retried proving jobs',
@@ -918,12 +1220,6 @@ export const PROVING_AGENT_IDLE = {
918
1220
  unit: 's',
919
1221
  valueType: ValueType.DOUBLE
920
1222
  };
921
- export const PROVER_NODE_EXECUTION_DURATION = {
922
- name: 'aztec.prover_node.execution.duration',
923
- description: 'Duration of execution of an epoch by the prover',
924
- unit: 'ms',
925
- valueType: ValueType.INT
926
- };
927
1223
  export const PROVER_NODE_JOB_DURATION = {
928
1224
  name: 'aztec.prover_node.job_duration',
929
1225
  description: 'Duration of proving job',
@@ -945,6 +1241,50 @@ export const PROVER_NODE_JOB_TRANSACTIONS = {
945
1241
  description: 'Number of transactions in a proven epoch',
946
1242
  valueType: ValueType.INT
947
1243
  };
1244
+ export const PROVER_NODE_BLOB_PROCESSING_LAST_DURATION = {
1245
+ name: 'aztec.prover_node.blob_processing.last_duration',
1246
+ description: 'Duration of blob processing step in epoch proving job',
1247
+ unit: 'ms',
1248
+ valueType: ValueType.INT
1249
+ };
1250
+ export const PROVER_NODE_BLOCK_PROCESSING_DURATION = {
1251
+ name: 'aztec.prover_node.block_processing.duration',
1252
+ description: 'Duration of processing a single block in epoch proving job',
1253
+ unit: 'ms',
1254
+ valueType: ValueType.INT
1255
+ };
1256
+ export const PROVER_NODE_CHECKPOINT_PROCESSING_DURATION = {
1257
+ name: 'aztec.prover_node.checkpoint_processing.duration',
1258
+ description: 'Duration of processing a single checkpoint in epoch proving job',
1259
+ unit: 'ms',
1260
+ valueType: ValueType.INT
1261
+ };
1262
+ export const PROVER_NODE_CHECKPOINT_BLOCKS = {
1263
+ name: 'aztec.prover_node.checkpoint_blocks',
1264
+ description: 'Number of blocks in a proven checkpoint',
1265
+ valueType: ValueType.INT
1266
+ };
1267
+ export const PROVER_NODE_CHECKPOINT_TRANSACTIONS = {
1268
+ name: 'aztec.prover_node.checkpoint_transactions',
1269
+ description: 'Number of transactions in a proven checkpoint',
1270
+ valueType: ValueType.INT
1271
+ };
1272
+ export const PROVER_NODE_CHECKPOINT_PROVING_DURATION = {
1273
+ name: 'aztec.prover_node.checkpoint_proving.duration',
1274
+ description: 'Duration from the start of checkpoint processing to its block proofs being ready (excludes tx gathering)',
1275
+ unit: 'ms',
1276
+ valueType: ValueType.INT
1277
+ };
1278
+ export const PROVER_NODE_ACTIVE_CHECKPOINTS = {
1279
+ name: 'aztec.prover_node.active_checkpoints',
1280
+ description: 'Current number of canonical CheckpointProvers in the store (i.e. checkpoints currently being proven)',
1281
+ valueType: ValueType.INT
1282
+ };
1283
+ export const PROVER_NODE_ACTIVE_EPOCH_SESSIONS = {
1284
+ name: 'aztec.prover_node.active_epoch_sessions',
1285
+ description: 'Current number of live EpochSessions, broken down by kind (full|partial)',
1286
+ valueType: ValueType.INT
1287
+ };
948
1288
  export const PROVER_NODE_REWARDS_TOTAL = {
949
1289
  name: 'aztec.prover_node.rewards_total',
950
1290
  description: 'The rewards earned (total)',
@@ -1055,6 +1395,18 @@ export const VALIDATOR_RE_EXECUTION_TX_COUNT = {
1055
1395
  unit: 'tx',
1056
1396
  valueType: ValueType.INT
1057
1397
  };
1398
+ export const VALIDATOR_CHECKPOINT_PROPOSAL_TO_PIPELINED_STATE_DURATION = {
1399
+ name: 'aztec.validator.checkpoint_proposal_to_pipelined_state_duration',
1400
+ description: 'Time from receiving a checkpoint proposal to setting proposed checkpoint state for pipelining',
1401
+ unit: 'ms',
1402
+ valueType: ValueType.INT
1403
+ };
1404
+ export const VALIDATOR_CHECKPOINT_PROPOSAL_RECEIVE_OFFSET_FROM_NEXT_SLOT_BOUNDARY = {
1405
+ name: 'aztec.validator.checkpoint.proposal_receive_offset_from_next_slot_boundary',
1406
+ description: 'Absolute offset from the next slot boundary when a foreign checkpoint proposal is received. Use aztec.slot_boundary_side to distinguish before vs after the boundary.',
1407
+ unit: 'ms',
1408
+ valueType: ValueType.INT
1409
+ };
1058
1410
  export const VALIDATOR_FAILED_REEXECUTION_COUNT = {
1059
1411
  name: 'aztec.validator.failed_reexecution_count',
1060
1412
  description: 'The number of failed re-executions',
@@ -1075,6 +1427,16 @@ export const VALIDATOR_ATTESTATION_FAILED_NODE_ISSUE_COUNT = {
1075
1427
  description: 'The number of failed attestations due to node issues (timeout, missing data, etc.)',
1076
1428
  valueType: ValueType.INT
1077
1429
  };
1430
+ export const VALIDATOR_CURRENT_EPOCH = {
1431
+ name: 'aztec.validator.current_epoch',
1432
+ description: 'The current epoch number, reflecting total epochs elapsed since genesis',
1433
+ valueType: ValueType.INT
1434
+ };
1435
+ export const VALIDATOR_ATTESTED_EPOCH_COUNT = {
1436
+ name: 'aztec.validator.attested_epoch_count',
1437
+ description: 'The number of epochs in which this node successfully submitted at least one attestation',
1438
+ valueType: ValueType.INT
1439
+ };
1078
1440
  export const NODEJS_EVENT_LOOP_DELAY_MIN = {
1079
1441
  name: 'nodejs.eventloop.delay.min',
1080
1442
  description: 'Minimum delay of the event loop',
@@ -1222,6 +1584,28 @@ export const TX_FILE_STORE_QUEUE_SIZE = {
1222
1584
  description: 'Number of txs pending upload',
1223
1585
  valueType: ValueType.INT
1224
1586
  };
1587
+ export const TX_FILE_STORE_DOWNLOADS_SUCCESS = {
1588
+ name: 'aztec.p2p.tx_file_store.downloads_success',
1589
+ description: 'Number of successful tx downloads from file storage',
1590
+ valueType: ValueType.INT
1591
+ };
1592
+ export const TX_FILE_STORE_DOWNLOADS_FAILED = {
1593
+ name: 'aztec.p2p.tx_file_store.downloads_failed',
1594
+ description: 'Number of failed tx downloads from file storage',
1595
+ valueType: ValueType.INT
1596
+ };
1597
+ export const TX_FILE_STORE_DOWNLOAD_DURATION = {
1598
+ name: 'aztec.p2p.tx_file_store.download_duration',
1599
+ description: 'Duration to download a tx from file storage',
1600
+ unit: 'ms',
1601
+ valueType: ValueType.INT
1602
+ };
1603
+ export const TX_FILE_STORE_DOWNLOAD_SIZE = {
1604
+ name: 'aztec.p2p.tx_file_store.download_size',
1605
+ description: 'Size of a downloaded tx from file storage',
1606
+ unit: 'By',
1607
+ valueType: ValueType.INT
1608
+ };
1225
1609
  export const IVC_VERIFIER_TIME = {
1226
1610
  name: 'aztec.ivc_verifier.time',
1227
1611
  description: 'Duration to verify chonk proofs',
@@ -1269,3 +1653,50 @@ export const IVC_VERIFIER_AGG_DURATION_AVG = {
1269
1653
  unit: 'ms',
1270
1654
  valueType: ValueType.DOUBLE
1271
1655
  };
1656
+ // HA Signer metrics
1657
+ export const HA_SIGNER_SIGNING_DURATION = {
1658
+ name: 'aztec.ha_signer.signing_duration',
1659
+ description: 'End-to-end duration for signing with HA protection (lock + sign + record)',
1660
+ unit: 'ms',
1661
+ valueType: ValueType.INT
1662
+ };
1663
+ export const HA_SIGNER_SIGNING_SUCCESS_COUNT = {
1664
+ name: 'aztec.ha_signer.signing_success_count',
1665
+ description: 'Count of successful signing operations',
1666
+ valueType: ValueType.INT
1667
+ };
1668
+ export const HA_SIGNER_DUTY_ALREADY_SIGNED_COUNT = {
1669
+ name: 'aztec.ha_signer.duty_already_signed_count',
1670
+ description: 'Count of DutyAlreadySignedError (expected in HA; another node signed first)',
1671
+ valueType: ValueType.INT
1672
+ };
1673
+ export const HA_SIGNER_SLASHING_PROTECTION_COUNT = {
1674
+ name: 'aztec.ha_signer.slashing_protection_count',
1675
+ description: 'Count of SlashingProtectionError (attempted to sign different data)',
1676
+ valueType: ValueType.INT
1677
+ };
1678
+ export const HA_SIGNER_SIGNING_ERROR_COUNT = {
1679
+ name: 'aztec.ha_signer.signing_error_count',
1680
+ description: 'Count of signing function failures (lock deleted for retry)',
1681
+ valueType: ValueType.INT
1682
+ };
1683
+ export const HA_SIGNER_LOCK_ACQUIRED_COUNT = {
1684
+ name: 'aztec.ha_signer.lock_acquired_count',
1685
+ description: 'Count of lock acquisitions (new lock acquired vs existing record found)',
1686
+ valueType: ValueType.INT
1687
+ };
1688
+ export const HA_SIGNER_CLEANUP_STUCK_DUTIES_COUNT = {
1689
+ name: 'aztec.ha_signer.cleanup_stuck_duties_count',
1690
+ description: 'Number of stuck duties cleaned up per cleanup run',
1691
+ valueType: ValueType.INT
1692
+ };
1693
+ export const HA_SIGNER_CLEANUP_OLD_DUTIES_COUNT = {
1694
+ name: 'aztec.ha_signer.cleanup_old_duties_count',
1695
+ description: 'Number of old duties cleaned up',
1696
+ valueType: ValueType.INT
1697
+ };
1698
+ export const HA_SIGNER_CLEANUP_OUTDATED_ROLLUP_DUTIES_COUNT = {
1699
+ name: 'aztec.ha_signer.cleanup_outdated_rollup_duties_count',
1700
+ description: 'Number of duties cleaned due to rollup upgrade',
1701
+ valueType: ValueType.INT
1702
+ };
@@ -0,0 +1,29 @@
1
+ import type { Logger } from '@aztec/foundation/log';
2
+ import { type Context } from '@opentelemetry/api';
3
+ import type { SpanExporter } from '@opentelemetry/sdk-trace-base';
4
+ import { BatchSpanProcessor, type BufferConfig, type ReadableSpan, type Span } from '@opentelemetry/sdk-trace-node';
5
+ export type MonitoredBatchSpanProcessorConfig = BufferConfig & {
6
+ minTraceDurationMs?: number;
7
+ };
8
+ /**
9
+ * Wraps BatchSpanProcessor to emit warnings when spans are dropped due to a full queue.
10
+ * The standard BatchSpanProcessor silently discards spans when its internal queue reaches
11
+ * maxQueueSize, making telemetry data loss invisible to operators.
12
+ */
13
+ export declare class MonitoredBatchSpanProcessor extends BatchSpanProcessor {
14
+ private readonly maxQueueSize;
15
+ private readonly minTraceDurationMs;
16
+ private readonly log;
17
+ private approxQueueSize;
18
+ private droppedSinceLastWarning;
19
+ private totalDropped;
20
+ private lastWarningTime;
21
+ constructor(exporter: SpanExporter, log: Logger, config?: MonitoredBatchSpanProcessorConfig);
22
+ onStart(span: Span, parentContext: Context): void;
23
+ onEnd(span: ReadableSpan): void;
24
+ forceFlush(): Promise<void>;
25
+ shutdown(): Promise<void>;
26
+ private shouldDropShortSpan;
27
+ private maybeLogDropWarning;
28
+ }
29
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9uaXRvcmVkX2JhdGNoX3NwYW5fcHJvY2Vzc29yLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvbW9uaXRvcmVkX2JhdGNoX3NwYW5fcHJvY2Vzc29yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBRXBELE9BQU8sRUFBRSxLQUFLLE9BQU8sRUFBa0IsTUFBTSxvQkFBb0IsQ0FBQztBQUVsRSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNsRSxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsS0FBSyxZQUFZLEVBQUUsS0FBSyxZQUFZLEVBQUUsS0FBSyxJQUFJLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQWFwSCxNQUFNLE1BQU0saUNBQWlDLEdBQUcsWUFBWSxHQUFHO0lBQzdELGtCQUFrQixDQUFDLEVBQUUsTUFBTSxDQUFDO0NBQzdCLENBQUM7QUFFRjs7OztHQUlHO0FBQ0gscUJBQWEsMkJBQTRCLFNBQVEsa0JBQWtCO0lBQ2pFLE9BQU8sQ0FBQyxRQUFRLENBQUMsWUFBWSxDQUFTO0lBQ3RDLE9BQU8sQ0FBQyxRQUFRLENBQUMsa0JBQWtCLENBQVM7SUFDNUMsT0FBTyxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQVM7SUFFN0IsT0FBTyxDQUFDLGVBQWUsQ0FBSztJQUM1QixPQUFPLENBQUMsdUJBQXVCLENBQUs7SUFDcEMsT0FBTyxDQUFDLFlBQVksQ0FBSztJQUN6QixPQUFPLENBQUMsZUFBZSxDQUFLO0lBRTVCLFlBQVksUUFBUSxFQUFFLFlBQVksRUFBRSxHQUFHLEVBQUUsTUFBTSxFQUFFLE1BQU0sQ0FBQyxFQUFFLGlDQUFpQyxFQU8xRjtJQUVRLE9BQU8sQ0FBQyxJQUFJLEVBQUUsSUFBSSxFQUFFLGFBQWEsRUFBRSxPQUFPLEdBQUcsSUFBSSxDQUV6RDtJQUVRLEtBQUssQ0FBQyxJQUFJLEVBQUUsWUFBWSxHQUFHLElBQUksQ0FhdkM7SUFFYyxVQUFVLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUd6QztJQUVjLFFBQVEsSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLENBT3ZDO0lBRUQsT0FBTyxDQUFDLG1CQUFtQjtJQVEzQixPQUFPLENBQUMsbUJBQW1CO0NBWTVCIn0=
@@ -0,0 +1 @@
1
+ {"version":3,"file":"monitored_batch_span_processor.d.ts","sourceRoot":"","sources":["../src/monitored_batch_span_processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,KAAK,OAAO,EAAkB,MAAM,oBAAoB,CAAC;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAapH,MAAM,MAAM,iCAAiC,GAAG,YAAY,GAAG;IAC7D,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,2BAA4B,SAAQ,kBAAkB;IACjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;IAC5C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAE7B,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,uBAAuB,CAAK;IACpC,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,eAAe,CAAK;IAE5B,YAAY,QAAQ,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,iCAAiC,EAO1F;IAEQ,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAEzD;IAEQ,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAavC;IAEc,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAGzC;IAEc,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAOvC;IAED,OAAO,CAAC,mBAAmB;IAQ3B,OAAO,CAAC,mBAAmB;CAY5B"}