@aztec/telemetry-client 0.0.1-commit.c31f2472 → 0.0.1-commit.c52d6e7

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 (50) hide show
  1. package/dest/attributes.d.ts +17 -2
  2. package/dest/attributes.d.ts.map +1 -1
  3. package/dest/attributes.js +8 -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/lmdb_metrics.d.ts +2 -2
  8. package/dest/lmdb_metrics.d.ts.map +1 -1
  9. package/dest/metrics.d.ts +78 -5
  10. package/dest/metrics.d.ts.map +1 -1
  11. package/dest/metrics.js +414 -19
  12. package/dest/monitored_batch_span_processor.d.ts +29 -0
  13. package/dest/monitored_batch_span_processor.d.ts.map +1 -0
  14. package/dest/monitored_batch_span_processor.js +75 -0
  15. package/dest/otel.d.ts +6 -1
  16. package/dest/otel.d.ts.map +1 -1
  17. package/dest/otel.js +99 -4
  18. package/dest/otel_propagation.d.ts +3 -1
  19. package/dest/otel_propagation.d.ts.map +1 -1
  20. package/dest/otel_propagation.js +49 -1
  21. package/dest/otel_resource.d.ts +1 -1
  22. package/dest/otel_resource.d.ts.map +1 -1
  23. package/dest/otel_resource.js +14 -2
  24. package/dest/start.d.ts +1 -1
  25. package/dest/start.d.ts.map +1 -1
  26. package/dest/start.js +1 -1
  27. package/dest/telemetry.d.ts +2 -2
  28. package/dest/telemetry.d.ts.map +1 -1
  29. package/dest/wrappers/fetch.d.ts +3 -3
  30. package/dest/wrappers/fetch.d.ts.map +1 -1
  31. package/dest/wrappers/fetch.js +3 -2
  32. package/dest/wrappers/index.d.ts +1 -2
  33. package/dest/wrappers/index.d.ts.map +1 -1
  34. package/dest/wrappers/index.js +0 -1
  35. package/package.json +3 -3
  36. package/src/attributes.ts +21 -1
  37. package/src/config.ts +24 -9
  38. package/src/metrics.ts +435 -19
  39. package/src/monitored_batch_span_processor.ts +100 -0
  40. package/src/otel.ts +69 -3
  41. package/src/otel_propagation.ts +42 -1
  42. package/src/otel_resource.ts +19 -2
  43. package/src/start.ts +6 -1
  44. package/src/telemetry.ts +0 -1
  45. package/src/wrappers/fetch.ts +9 -3
  46. package/src/wrappers/index.ts +0 -1
  47. package/dest/wrappers/l2_block_stream.d.ts +0 -16
  48. package/dest/wrappers/l2_block_stream.d.ts.map +0 -1
  49. package/dest/wrappers/l2_block_stream.js +0 -400
  50. package/src/wrappers/l2_block_stream.ts +0 -41
package/dest/metrics.js CHANGED
@@ -128,10 +128,56 @@ export const MEMPOOL_TX_ADDED_COUNT = {
128
128
  };
129
129
  export const MEMPOOL_TX_MINED_DELAY = {
130
130
  name: 'aztec.mempool.tx_mined_delay',
131
- description: 'Delay between transaction added and evicted from the mempool',
131
+ description: 'Delay (ms) from a transaction being received into the pool to being mined',
132
132
  unit: 'ms',
133
133
  valueType: ValueType.INT
134
134
  };
135
+ export const MEMPOOL_TX_POOL_V2_EVICTED_COUNT = {
136
+ name: 'aztec.mempool.tx_pool_v2.evicted_count',
137
+ description: 'The number of transactions evicted from the tx pool',
138
+ valueType: ValueType.INT
139
+ };
140
+ export const MEMPOOL_TX_POOL_V2_IGNORED_COUNT = {
141
+ name: 'aztec.mempool.tx_pool_v2.ignored_count',
142
+ description: 'The number of transactions ignored in addPendingTxs',
143
+ valueType: ValueType.INT
144
+ };
145
+ export const MEMPOOL_TX_POOL_V2_REJECTED_COUNT = {
146
+ name: 'aztec.mempool.tx_pool_v2.rejected_count',
147
+ description: 'The number of transactions rejected in addPendingTxs',
148
+ valueType: ValueType.INT
149
+ };
150
+ export const MEMPOOL_TX_POOL_V2_SOFT_DELETED_HITS = {
151
+ name: 'aztec.mempool.tx_pool_v2.soft_deleted_hits',
152
+ description: 'The number of transactions found in the soft-deleted pool',
153
+ valueType: ValueType.INT
154
+ };
155
+ export const MEMPOOL_TX_POOL_V2_MISSING_ON_PROTECT = {
156
+ name: 'aztec.mempool.tx_pool_v2.missing_on_protect',
157
+ description: 'The number of truly missing transactions in protectTxs',
158
+ valueType: ValueType.INT
159
+ };
160
+ export const MEMPOOL_TX_POOL_V2_MISSING_PREVIOUSLY_EVICTED = {
161
+ name: 'aztec.mempool.tx_pool_v2.missing_previously_evicted',
162
+ description: 'The number of truly missing transactions in protectTxs that were previously evicted',
163
+ valueType: ValueType.INT
164
+ };
165
+ export const MEMPOOL_TX_POOL_V2_METADATA_MEMORY = {
166
+ name: 'aztec.mempool.tx_pool_v2.metadata_memory',
167
+ description: 'Estimated total memory consumed by in-memory transaction metadata',
168
+ unit: 'By',
169
+ valueType: ValueType.INT
170
+ };
171
+ export const MEMPOOL_TX_POOL_V2_DUPLICATE_ADD = {
172
+ name: 'aztec.mempool.tx_pool_v2.duplicate_add',
173
+ description: 'Transactions received via addPendingTxs that were already in the pool',
174
+ valueType: ValueType.INT
175
+ };
176
+ export const MEMPOOL_TX_POOL_V2_ALREADY_PROTECTED_ADD = {
177
+ name: 'aztec.mempool.tx_pool_v2.already_protected_add',
178
+ description: 'Transactions received via addPendingTxs that were already pre-protected',
179
+ valueType: ValueType.INT
180
+ };
135
181
  export const DB_NUM_ITEMS = {
136
182
  name: 'aztec.db.num_items',
137
183
  description: 'LMDB Num Items',
@@ -187,6 +233,11 @@ export const ARCHIVER_BLOCK_HEIGHT = {
187
233
  description: 'The height of the latest block processed by the archiver',
188
234
  valueType: ValueType.INT
189
235
  };
236
+ export const ARCHIVER_CHECKPOINT_HEIGHT = {
237
+ name: 'aztec.archiver.checkpoint_height',
238
+ description: 'The height of the latest checkpoint processed by the archiver',
239
+ valueType: ValueType.INT
240
+ };
190
241
  export const ARCHIVER_ROLLUP_PROOF_DELAY = {
191
242
  name: 'aztec.archiver.rollup_proof_delay',
192
243
  description: 'Time after a block is submitted until its proof is published',
@@ -216,6 +267,12 @@ export const ARCHIVER_SYNC_PER_BLOCK = {
216
267
  unit: 'ms',
217
268
  valueType: ValueType.INT
218
269
  };
270
+ export const ARCHIVER_SYNC_PER_CHECKPOINT = {
271
+ name: 'aztec.archiver.checkpoint.sync_per_item_duration',
272
+ description: 'Duration to sync a checkpoint',
273
+ unit: 'ms',
274
+ valueType: ValueType.INT
275
+ };
219
276
  export const ARCHIVER_SYNC_BLOCK_COUNT = {
220
277
  name: 'aztec.archiver.block.sync_count',
221
278
  description: 'Number of blocks synced from L1',
@@ -240,7 +297,7 @@ export const ARCHIVER_PRUNE_DURATION = {
240
297
  };
241
298
  export const ARCHIVER_PRUNE_COUNT = {
242
299
  name: 'aztec.archiver.prune_count',
243
- description: 'Number of prunes detected',
300
+ 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
301
  valueType: ValueType.INT
245
302
  };
246
303
  export const ARCHIVER_TOTAL_TXS = {
@@ -253,6 +310,17 @@ export const ARCHIVER_BLOCK_PROPOSAL_TX_TARGET_COUNT = {
253
310
  description: 'Number of block proposals by tx target',
254
311
  valueType: ValueType.INT
255
312
  };
313
+ export const ARCHIVER_CHECKPOINT_L1_INCLUSION_DELAY = {
314
+ name: 'aztec.archiver.checkpoint_l1_inclusion_delay',
315
+ description: 'Seconds into the L2 slot when the checkpoint L1 tx was included',
316
+ unit: 's',
317
+ valueType: ValueType.INT
318
+ };
319
+ export const ARCHIVER_CHECKPOINT_PROMOTED_COUNT = {
320
+ name: 'aztec.archiver.checkpoint_promoted_count',
321
+ description: 'Number of checkpoints promoted from proposed (blob fetch skipped)',
322
+ valueType: ValueType.INT
323
+ };
256
324
  export const NODE_RECEIVE_TX_DURATION = {
257
325
  name: 'aztec.node.receive_tx.duration',
258
326
  description: 'The duration of the receiveTx method',
@@ -281,6 +349,12 @@ export const SEQUENCER_STATE_TRANSITION_BUFFER_DURATION = {
281
349
  unit: 'ms',
282
350
  valueType: ValueType.INT
283
351
  };
352
+ export const SEQUENCER_STATE_DURATION = {
353
+ name: 'aztec.sequencer.state_duration',
354
+ description: 'Wall-clock time spent in each sequencer state, labelled by the state being left',
355
+ unit: 'ms',
356
+ valueType: ValueType.INT
357
+ };
284
358
  export const SEQUENCER_BLOCK_BUILD_DURATION = {
285
359
  name: 'aztec.sequencer.block.build_duration',
286
360
  description: 'Duration to build a block',
@@ -298,9 +372,15 @@ export const SEQUENCER_BLOCK_COUNT = {
298
372
  description: 'Number of blocks built by this sequencer',
299
373
  valueType: ValueType.INT
300
374
  };
301
- export const SEQUENCER_CURRENT_BLOCK_REWARDS = {
302
- name: 'aztec.sequencer.current_block_rewards',
303
- description: 'The rewards earned',
375
+ export const SEQUENCER_BLOCK_INTER_BLOCK_TIME = {
376
+ name: 'aztec.sequencer.block.inter_block_time',
377
+ description: 'Wall-clock time elapsed between consecutive blocks being built by this sequencer',
378
+ unit: 'ms',
379
+ valueType: ValueType.INT
380
+ };
381
+ export const SEQUENCER_CURRENT_SLOT_REWARDS = {
382
+ name: 'aztec.sequencer.current_slot_rewards',
383
+ description: 'The rewards earned per filled slot',
304
384
  valueType: ValueType.DOUBLE
305
385
  };
306
386
  export const SEQUENCER_SLOT_COUNT = {
@@ -321,12 +401,12 @@ export const SEQUENCER_CHECKPOINT_ATTESTATION_DELAY = {
321
401
  };
322
402
  export const SEQUENCER_COLLECTED_ATTESTATIONS_COUNT = {
323
403
  name: 'aztec.sequencer.attestations.collected_count',
324
- description: 'The number of attestations collected for a block proposal',
404
+ description: 'The number of attestations collected for a checkpoint proposal',
325
405
  valueType: ValueType.INT
326
406
  };
327
407
  export const SEQUENCER_REQUIRED_ATTESTATIONS_COUNT = {
328
408
  name: 'aztec.sequencer.attestations.required_count',
329
- description: 'The minimum number of attestations required to publish a block',
409
+ description: 'The minimum number of attestations required to publish a checkpoint',
330
410
  valueType: ValueType.INT
331
411
  };
332
412
  export const SEQUENCER_COLLECT_ATTESTATIONS_DURATION = {
@@ -346,14 +426,60 @@ export const SEQUENCER_BLOCK_PROPOSAL_FAILED_COUNT = {
346
426
  description: 'The number of times block proposal failed (including validation builds)',
347
427
  valueType: ValueType.INT
348
428
  };
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)',
429
+ export const SEQUENCER_CHECKPOINT_PROPOSAL_SUCCESS_COUNT = {
430
+ name: 'aztec.sequencer.checkpoint.proposal_success_count',
431
+ description: 'The number of times checkpoint proposal succeeded',
432
+ valueType: ValueType.INT
433
+ };
434
+ export const SEQUENCER_CHECKPOINT_PRECHECK_FAILED_COUNT = {
435
+ name: 'aztec.sequencer.checkpoint.precheck_failed_count',
436
+ description: 'The number of times checkpoint pre-build checks failed',
352
437
  valueType: ValueType.INT
353
438
  };
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',
439
+ export const SEQUENCER_CHECKPOINT_PROPOSAL_FAILED_COUNT = {
440
+ name: 'aztec.sequencer.checkpoint.proposal_failed_count',
441
+ description: 'The number of times checkpoint proposal failed',
442
+ valueType: ValueType.INT
443
+ };
444
+ export const SEQUENCER_CHECKPOINT_BUILD_DURATION = {
445
+ name: 'aztec.sequencer.checkpoint.build_duration',
446
+ description: 'Total duration to build all blocks in a checkpoint',
447
+ unit: 'ms',
448
+ valueType: ValueType.INT
449
+ };
450
+ export const SEQUENCER_CHECKPOINT_START_TO_FIRST_BLOCK_DURATION = {
451
+ name: 'aztec.sequencer.checkpoint.start_to_first_block_duration',
452
+ description: 'Time from starting checkpoint work to the first block finishing build',
453
+ unit: 'ms',
454
+ valueType: ValueType.INT
455
+ };
456
+ export const SEQUENCER_CHECKPOINT_LAST_BLOCK_TO_BROADCAST_DURATION = {
457
+ name: 'aztec.sequencer.checkpoint.last_block_to_broadcast_duration',
458
+ description: 'Time from the final block finishing build to the checkpoint proposal being broadcast',
459
+ unit: 'ms',
460
+ valueType: ValueType.INT
461
+ };
462
+ export const SEQUENCER_PIPELINED_CHECKPOINT_BUILD_START_OFFSET_FROM_SLOT_BOUNDARY = {
463
+ name: 'aztec.sequencer.pipelined_checkpoint.build_start_offset_from_slot_boundary',
464
+ 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.',
465
+ unit: 'ms',
466
+ valueType: ValueType.INT
467
+ };
468
+ export const SEQUENCER_CHECKPOINT_BLOCK_COUNT = {
469
+ name: 'aztec.sequencer.checkpoint.block_count',
470
+ description: 'Number of blocks built in a checkpoint',
471
+ valueType: ValueType.INT
472
+ };
473
+ export const SEQUENCER_CHECKPOINT_TX_COUNT = {
474
+ name: 'aztec.sequencer.checkpoint.tx_count',
475
+ description: 'Total number of transactions across all blocks in a checkpoint',
476
+ unit: 'tx',
477
+ valueType: ValueType.INT
478
+ };
479
+ export const SEQUENCER_CHECKPOINT_TOTAL_MANA = {
480
+ name: 'aztec.sequencer.checkpoint.total_mana',
481
+ description: 'Total L2 mana used across all blocks in a checkpoint',
482
+ unit: 'mana',
357
483
  valueType: ValueType.INT
358
484
  };
359
485
  export const SEQUENCER_SLASHING_ATTEMPTS_COUNT = {
@@ -361,11 +487,57 @@ export const SEQUENCER_SLASHING_ATTEMPTS_COUNT = {
361
487
  description: 'The number of slashing action attempts',
362
488
  valueType: ValueType.INT
363
489
  };
490
+ export const SLASHER_ROUND_EXECUTED_COUNT = {
491
+ name: 'aztec.slasher.round.executed_count',
492
+ description: 'The number of slashing rounds executed',
493
+ valueType: ValueType.INT
494
+ };
495
+ export const SLASHER_OWN_VALIDATOR_TARGETED_COUNT = {
496
+ name: 'aztec.slasher.own_validator.targeted_count',
497
+ 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.',
498
+ valueType: ValueType.INT
499
+ };
500
+ export const SLASHER_OWN_VALIDATOR_CURRENT_ROUND_VOTES_MAX = {
501
+ name: 'aztec.slasher.own_validator.current_round_votes_max',
502
+ 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.',
503
+ valueType: ValueType.INT
504
+ };
505
+ export const SLASHER_QUORUM_SIZE = {
506
+ name: 'aztec.slasher.quorum_size',
507
+ description: 'The number of votes a validator must receive in a round to be slashed',
508
+ valueType: ValueType.INT
509
+ };
510
+ export const SLASHER_OWN_VALIDATOR_SLASHED_COUNT = {
511
+ name: 'aztec.slasher.own_validator.slashed_count',
512
+ description: "The number of times one of the node's own validators was slashed, from executed Slashed events",
513
+ valueType: ValueType.INT
514
+ };
515
+ export const SLASHER_OWN_VALIDATOR_SLASHED_AMOUNT = {
516
+ name: 'aztec.slasher.own_validator.slashed_amount',
517
+ description: "Cumulative amount slashed from the node's own validators in whole staking-asset tokens, from executed " + 'Slashed events',
518
+ unit: 'tokens',
519
+ valueType: ValueType.DOUBLE
520
+ };
364
521
  export const SEQUENCER_CHECKPOINT_SUCCESS_COUNT = {
365
522
  name: 'aztec.sequencer.checkpoint.success_count',
366
523
  description: 'The number of times checkpoint publishing succeeded',
367
524
  valueType: ValueType.INT
368
525
  };
526
+ export const SEQUENCER_PIPELINE_DEPTH = {
527
+ name: 'aztec.sequencer.pipeline.depth',
528
+ description: 'Current pipeline depth when builder pipelining is enabled',
529
+ valueType: ValueType.INT
530
+ };
531
+ export const SEQUENCER_PIPELINE_DISCARDS_COUNT = {
532
+ name: 'aztec.sequencer.pipeline.discards_count',
533
+ description: 'The number of times a pipeline was discarded',
534
+ valueType: ValueType.INT
535
+ };
536
+ export const SEQUENCER_PIPELINE_PARENT_CHECKPOINT_MISMATCH_COUNT = {
537
+ name: 'aztec.sequencer.pipeline.parent_checkpoint_mismatch_count',
538
+ description: 'The number of times a pipelined checkpoint was discarded because the parent did not match expectations',
539
+ valueType: ValueType.INT
540
+ };
369
541
  // Fisherman fee analysis metrics
370
542
  export const FISHERMAN_FEE_ANALYSIS_WOULD_BE_INCLUDED = {
371
543
  name: 'aztec.fisherman.fee_analysis.would_be_included',
@@ -424,6 +596,29 @@ export const FISHERMAN_FEE_ANALYSIS_MINED_BLOB_TX_TOTAL_COST = {
424
596
  unit: 'eth',
425
597
  valueType: ValueType.DOUBLE
426
598
  };
599
+ export const FISHERMAN_FEE_ANALYSIS_PENDING_BLOB_COUNT = {
600
+ name: 'aztec.fisherman.fee_analysis.pending_blob_count',
601
+ description: 'Total number of blobs in pending blob transactions',
602
+ unit: 'blobs',
603
+ valueType: ValueType.INT
604
+ };
605
+ export const FISHERMAN_FEE_ANALYSIS_INCLUDED_BLOB_COUNT = {
606
+ name: 'aztec.fisherman.fee_analysis.included_blob_count',
607
+ description: 'Total number of blobs included in the mined block',
608
+ unit: 'blobs',
609
+ valueType: ValueType.INT
610
+ };
611
+ export const FISHERMAN_FEE_ANALYSIS_BLOCK_BLOBS_FULL = {
612
+ name: 'aztec.fisherman.fee_analysis.block_blobs_full',
613
+ description: 'Whether the mined block reached 100% blob capacity',
614
+ valueType: ValueType.INT
615
+ };
616
+ export const FISHERMAN_FEE_ANALYSIS_MAX_BLOB_CAPACITY = {
617
+ name: 'aztec.fisherman.fee_analysis.max_blob_capacity',
618
+ description: 'Maximum blob capacity for the analyzed block based on L1 upgrade schedule',
619
+ unit: 'blobs',
620
+ valueType: ValueType.INT
621
+ };
427
622
  export const VALIDATOR_INVALID_ATTESTATION_RECEIVED_COUNT = {
428
623
  name: 'aztec.validator.invalid_attestation_received_count',
429
624
  description: 'Number of invalid attestations received',
@@ -507,6 +702,24 @@ export const L1_PUBLISHER_TX_TOTAL_FEE = {
507
702
  unit: 'eth',
508
703
  valueType: ValueType.DOUBLE
509
704
  };
705
+ export const PROVER_NODE_ESTIMATED_SUBMISSION_GAS = {
706
+ name: 'aztec.prover_node.estimated_submission.gas',
707
+ description: 'Estimated gas for a proof submission tx (proof publishing disabled, not actually sent)',
708
+ unit: 'gas',
709
+ valueType: ValueType.INT
710
+ };
711
+ export const PROVER_NODE_ESTIMATED_SUBMISSION_GAS_PRICE = {
712
+ name: 'aztec.prover_node.estimated_submission.gas_price',
713
+ description: 'Estimated effective gas price for a proof submission tx (proof publishing disabled, not actually sent)',
714
+ unit: 'gwei',
715
+ valueType: ValueType.DOUBLE
716
+ };
717
+ export const PROVER_NODE_ESTIMATED_SUBMISSION_TOTAL_FEE = {
718
+ name: 'aztec.prover_node.estimated_submission.total_fee',
719
+ description: 'Estimated total L1 fee for a proof submission tx (proof publishing disabled, not actually sent)',
720
+ unit: 'eth',
721
+ valueType: ValueType.DOUBLE
722
+ };
510
723
  export const L1_BLOCK_HEIGHT = {
511
724
  name: 'aztec.l1.block_height',
512
725
  description: 'The current L1 block height',
@@ -597,6 +810,12 @@ export const PEER_MANAGER_PEER_COUNT = {
597
810
  unit: 'peers',
598
811
  valueType: ValueType.INT
599
812
  };
813
+ export const PEER_MANAGER_HEALTHY_PEER_COUNT = {
814
+ name: 'aztec.peer_manager.healthy_peer_count',
815
+ description: 'Number of healthy (non-protected, non-banned) peers',
816
+ unit: 'peers',
817
+ valueType: ValueType.INT
818
+ };
600
819
  export const PEER_MANAGER_LOW_SCORE_DISCONNECTS = {
601
820
  name: 'aztec.peer_manager.low_score_disconnects',
602
821
  description: 'Number of peers disconnected due to low score',
@@ -721,6 +940,11 @@ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_AVG = {
721
940
  unit: 'ms',
722
941
  valueType: ValueType.INT
723
942
  };
943
+ export const P2P_GOSSIP_SLOW_VALIDATION_COUNT = {
944
+ name: 'aztec.p2p.gossip.slow_validation_count',
945
+ description: 'Number of gossip validations that exceeded 75% of the mcache eviction window',
946
+ valueType: ValueType.INT
947
+ };
724
948
  export const PUBLIC_PROCESSOR_TX_DURATION = {
725
949
  name: 'aztec.public_processor.tx_duration',
726
950
  description: 'Duration to process a public transaction',
@@ -784,6 +1008,17 @@ export const PUBLIC_PROCESSOR_TREE_INSERTION = {
784
1008
  unit: 'ms',
785
1009
  valueType: ValueType.INT
786
1010
  };
1011
+ export const PUBLIC_PROCESSOR_SILENTLY_SKIPPED_COUNT = {
1012
+ name: 'aztec.public_processor.silently_skipped_count',
1013
+ description: 'Public txs fully processed then skipped (e.g. blob-field limit); not counted as processed or failed',
1014
+ valueType: ValueType.INT
1015
+ };
1016
+ export const PUBLIC_PROCESSOR_SILENTLY_SKIPPED_DURATION = {
1017
+ name: 'aztec.public_processor.silently_skipped_duration',
1018
+ description: 'Wall-clock time spent processing txs that were then silently skipped',
1019
+ unit: 'ms',
1020
+ valueType: ValueType.INT
1021
+ };
787
1022
  export const PUBLIC_EXECUTOR_PREFIX = 'aztec.public_executor.';
788
1023
  export const PUBLIC_EXECUTOR_SIMULATION_COUNT = {
789
1024
  name: 'aztec.public_executor.simulation_count',
@@ -873,6 +1108,11 @@ export const PROVING_QUEUE_REJECTED_JOBS = {
873
1108
  description: 'Number of rejected proving jobs',
874
1109
  valueType: ValueType.INT
875
1110
  };
1111
+ export const PROVING_QUEUE_ABORTED_JOBS = {
1112
+ name: 'aztec.proving_queue.aborted_jobs_count',
1113
+ description: 'Number of aborted proving jobs',
1114
+ valueType: ValueType.INT
1115
+ };
876
1116
  export const PROVING_QUEUE_RETRIED_JOBS = {
877
1117
  name: 'aztec.proving_queue.retried_jobs_count',
878
1118
  description: 'Number of retried proving jobs',
@@ -918,12 +1158,6 @@ export const PROVING_AGENT_IDLE = {
918
1158
  unit: 's',
919
1159
  valueType: ValueType.DOUBLE
920
1160
  };
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
1161
  export const PROVER_NODE_JOB_DURATION = {
928
1162
  name: 'aztec.prover_node.job_duration',
929
1163
  description: 'Duration of proving job',
@@ -945,6 +1179,50 @@ export const PROVER_NODE_JOB_TRANSACTIONS = {
945
1179
  description: 'Number of transactions in a proven epoch',
946
1180
  valueType: ValueType.INT
947
1181
  };
1182
+ export const PROVER_NODE_BLOB_PROCESSING_LAST_DURATION = {
1183
+ name: 'aztec.prover_node.blob_processing.last_duration',
1184
+ description: 'Duration of blob processing step in epoch proving job',
1185
+ unit: 'ms',
1186
+ valueType: ValueType.INT
1187
+ };
1188
+ export const PROVER_NODE_BLOCK_PROCESSING_DURATION = {
1189
+ name: 'aztec.prover_node.block_processing.duration',
1190
+ description: 'Duration of processing a single block in epoch proving job',
1191
+ unit: 'ms',
1192
+ valueType: ValueType.INT
1193
+ };
1194
+ export const PROVER_NODE_CHECKPOINT_PROCESSING_DURATION = {
1195
+ name: 'aztec.prover_node.checkpoint_processing.duration',
1196
+ description: 'Duration of processing a single checkpoint in epoch proving job',
1197
+ unit: 'ms',
1198
+ valueType: ValueType.INT
1199
+ };
1200
+ export const PROVER_NODE_CHECKPOINT_BLOCKS = {
1201
+ name: 'aztec.prover_node.checkpoint_blocks',
1202
+ description: 'Number of blocks in a proven checkpoint',
1203
+ valueType: ValueType.INT
1204
+ };
1205
+ export const PROVER_NODE_CHECKPOINT_TRANSACTIONS = {
1206
+ name: 'aztec.prover_node.checkpoint_transactions',
1207
+ description: 'Number of transactions in a proven checkpoint',
1208
+ valueType: ValueType.INT
1209
+ };
1210
+ export const PROVER_NODE_CHECKPOINT_PROVING_DURATION = {
1211
+ name: 'aztec.prover_node.checkpoint_proving.duration',
1212
+ description: 'Duration from the start of checkpoint processing to its block proofs being ready (excludes tx gathering)',
1213
+ unit: 'ms',
1214
+ valueType: ValueType.INT
1215
+ };
1216
+ export const PROVER_NODE_ACTIVE_CHECKPOINTS = {
1217
+ name: 'aztec.prover_node.active_checkpoints',
1218
+ description: 'Current number of canonical CheckpointProvers in the store (i.e. checkpoints currently being proven)',
1219
+ valueType: ValueType.INT
1220
+ };
1221
+ export const PROVER_NODE_ACTIVE_EPOCH_SESSIONS = {
1222
+ name: 'aztec.prover_node.active_epoch_sessions',
1223
+ description: 'Current number of live EpochSessions, broken down by kind (full|partial)',
1224
+ valueType: ValueType.INT
1225
+ };
948
1226
  export const PROVER_NODE_REWARDS_TOTAL = {
949
1227
  name: 'aztec.prover_node.rewards_total',
950
1228
  description: 'The rewards earned (total)',
@@ -1055,6 +1333,18 @@ export const VALIDATOR_RE_EXECUTION_TX_COUNT = {
1055
1333
  unit: 'tx',
1056
1334
  valueType: ValueType.INT
1057
1335
  };
1336
+ export const VALIDATOR_CHECKPOINT_PROPOSAL_TO_PIPELINED_STATE_DURATION = {
1337
+ name: 'aztec.validator.checkpoint_proposal_to_pipelined_state_duration',
1338
+ description: 'Time from receiving a checkpoint proposal to setting proposed checkpoint state for pipelining',
1339
+ unit: 'ms',
1340
+ valueType: ValueType.INT
1341
+ };
1342
+ export const VALIDATOR_CHECKPOINT_PROPOSAL_RECEIVE_OFFSET_FROM_NEXT_SLOT_BOUNDARY = {
1343
+ name: 'aztec.validator.checkpoint.proposal_receive_offset_from_next_slot_boundary',
1344
+ 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.',
1345
+ unit: 'ms',
1346
+ valueType: ValueType.INT
1347
+ };
1058
1348
  export const VALIDATOR_FAILED_REEXECUTION_COUNT = {
1059
1349
  name: 'aztec.validator.failed_reexecution_count',
1060
1350
  description: 'The number of failed re-executions',
@@ -1075,6 +1365,16 @@ export const VALIDATOR_ATTESTATION_FAILED_NODE_ISSUE_COUNT = {
1075
1365
  description: 'The number of failed attestations due to node issues (timeout, missing data, etc.)',
1076
1366
  valueType: ValueType.INT
1077
1367
  };
1368
+ export const VALIDATOR_CURRENT_EPOCH = {
1369
+ name: 'aztec.validator.current_epoch',
1370
+ description: 'The current epoch number, reflecting total epochs elapsed since genesis',
1371
+ valueType: ValueType.INT
1372
+ };
1373
+ export const VALIDATOR_ATTESTED_EPOCH_COUNT = {
1374
+ name: 'aztec.validator.attested_epoch_count',
1375
+ description: 'The number of epochs in which this node successfully submitted at least one attestation',
1376
+ valueType: ValueType.INT
1377
+ };
1078
1378
  export const NODEJS_EVENT_LOOP_DELAY_MIN = {
1079
1379
  name: 'nodejs.eventloop.delay.min',
1080
1380
  description: 'Minimum delay of the event loop',
@@ -1196,6 +1496,54 @@ export const TX_COLLECTOR_DURATION_PER_TX = {
1196
1496
  unit: 'ms',
1197
1497
  valueType: ValueType.INT
1198
1498
  };
1499
+ export const TX_FILE_STORE_UPLOADS_SUCCESS = {
1500
+ name: 'aztec.p2p.tx_file_store.uploads_success',
1501
+ description: 'Number of successful tx uploads to file storage',
1502
+ valueType: ValueType.INT
1503
+ };
1504
+ export const TX_FILE_STORE_UPLOADS_FAILED = {
1505
+ name: 'aztec.p2p.tx_file_store.uploads_failed',
1506
+ description: 'Number of failed tx uploads to file storage',
1507
+ valueType: ValueType.INT
1508
+ };
1509
+ export const TX_FILE_STORE_UPLOADS_SKIPPED = {
1510
+ name: 'aztec.p2p.tx_file_store.uploads_skipped',
1511
+ description: 'Number of tx uploads skipped (duplicates)',
1512
+ valueType: ValueType.INT
1513
+ };
1514
+ export const TX_FILE_STORE_UPLOAD_DURATION = {
1515
+ name: 'aztec.p2p.tx_file_store.upload_duration',
1516
+ description: 'Duration to upload a tx to file storage',
1517
+ unit: 'ms',
1518
+ valueType: ValueType.INT
1519
+ };
1520
+ export const TX_FILE_STORE_QUEUE_SIZE = {
1521
+ name: 'aztec.p2p.tx_file_store.queue_size',
1522
+ description: 'Number of txs pending upload',
1523
+ valueType: ValueType.INT
1524
+ };
1525
+ export const TX_FILE_STORE_DOWNLOADS_SUCCESS = {
1526
+ name: 'aztec.p2p.tx_file_store.downloads_success',
1527
+ description: 'Number of successful tx downloads from file storage',
1528
+ valueType: ValueType.INT
1529
+ };
1530
+ export const TX_FILE_STORE_DOWNLOADS_FAILED = {
1531
+ name: 'aztec.p2p.tx_file_store.downloads_failed',
1532
+ description: 'Number of failed tx downloads from file storage',
1533
+ valueType: ValueType.INT
1534
+ };
1535
+ export const TX_FILE_STORE_DOWNLOAD_DURATION = {
1536
+ name: 'aztec.p2p.tx_file_store.download_duration',
1537
+ description: 'Duration to download a tx from file storage',
1538
+ unit: 'ms',
1539
+ valueType: ValueType.INT
1540
+ };
1541
+ export const TX_FILE_STORE_DOWNLOAD_SIZE = {
1542
+ name: 'aztec.p2p.tx_file_store.download_size',
1543
+ description: 'Size of a downloaded tx from file storage',
1544
+ unit: 'By',
1545
+ valueType: ValueType.INT
1546
+ };
1199
1547
  export const IVC_VERIFIER_TIME = {
1200
1548
  name: 'aztec.ivc_verifier.time',
1201
1549
  description: 'Duration to verify chonk proofs',
@@ -1243,3 +1591,50 @@ export const IVC_VERIFIER_AGG_DURATION_AVG = {
1243
1591
  unit: 'ms',
1244
1592
  valueType: ValueType.DOUBLE
1245
1593
  };
1594
+ // HA Signer metrics
1595
+ export const HA_SIGNER_SIGNING_DURATION = {
1596
+ name: 'aztec.ha_signer.signing_duration',
1597
+ description: 'End-to-end duration for signing with HA protection (lock + sign + record)',
1598
+ unit: 'ms',
1599
+ valueType: ValueType.INT
1600
+ };
1601
+ export const HA_SIGNER_SIGNING_SUCCESS_COUNT = {
1602
+ name: 'aztec.ha_signer.signing_success_count',
1603
+ description: 'Count of successful signing operations',
1604
+ valueType: ValueType.INT
1605
+ };
1606
+ export const HA_SIGNER_DUTY_ALREADY_SIGNED_COUNT = {
1607
+ name: 'aztec.ha_signer.duty_already_signed_count',
1608
+ description: 'Count of DutyAlreadySignedError (expected in HA; another node signed first)',
1609
+ valueType: ValueType.INT
1610
+ };
1611
+ export const HA_SIGNER_SLASHING_PROTECTION_COUNT = {
1612
+ name: 'aztec.ha_signer.slashing_protection_count',
1613
+ description: 'Count of SlashingProtectionError (attempted to sign different data)',
1614
+ valueType: ValueType.INT
1615
+ };
1616
+ export const HA_SIGNER_SIGNING_ERROR_COUNT = {
1617
+ name: 'aztec.ha_signer.signing_error_count',
1618
+ description: 'Count of signing function failures (lock deleted for retry)',
1619
+ valueType: ValueType.INT
1620
+ };
1621
+ export const HA_SIGNER_LOCK_ACQUIRED_COUNT = {
1622
+ name: 'aztec.ha_signer.lock_acquired_count',
1623
+ description: 'Count of lock acquisitions (new lock acquired vs existing record found)',
1624
+ valueType: ValueType.INT
1625
+ };
1626
+ export const HA_SIGNER_CLEANUP_STUCK_DUTIES_COUNT = {
1627
+ name: 'aztec.ha_signer.cleanup_stuck_duties_count',
1628
+ description: 'Number of stuck duties cleaned up per cleanup run',
1629
+ valueType: ValueType.INT
1630
+ };
1631
+ export const HA_SIGNER_CLEANUP_OLD_DUTIES_COUNT = {
1632
+ name: 'aztec.ha_signer.cleanup_old_duties_count',
1633
+ description: 'Number of old duties cleaned up',
1634
+ valueType: ValueType.INT
1635
+ };
1636
+ export const HA_SIGNER_CLEANUP_OUTDATED_ROLLUP_DUTIES_COUNT = {
1637
+ name: 'aztec.ha_signer.cleanup_outdated_rollup_duties_count',
1638
+ description: 'Number of duties cleaned due to rollup upgrade',
1639
+ valueType: ValueType.INT
1640
+ };
@@ -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"}