@aztec/telemetry-client 0.0.0-test.1 → 0.0.1-commit.b655e406

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 (73) hide show
  1. package/dest/attributes.d.ts +21 -8
  2. package/dest/attributes.d.ts.map +1 -1
  3. package/dest/attributes.js +16 -8
  4. package/dest/bench.d.ts +3 -0
  5. package/dest/bench.d.ts.map +1 -1
  6. package/dest/bench.js +7 -0
  7. package/dest/config.d.ts +5 -1
  8. package/dest/config.d.ts.map +1 -1
  9. package/dest/config.js +23 -1
  10. package/dest/index.d.ts +1 -0
  11. package/dest/index.d.ts.map +1 -1
  12. package/dest/index.js +1 -0
  13. package/dest/l1_metrics.d.ts +17 -0
  14. package/dest/l1_metrics.d.ts.map +1 -0
  15. package/dest/l1_metrics.js +70 -0
  16. package/dest/lmdb_metrics.d.ts +4 -2
  17. package/dest/lmdb_metrics.d.ts.map +1 -1
  18. package/dest/lmdb_metrics.js +8 -0
  19. package/dest/metrics.d.ts +87 -12
  20. package/dest/metrics.d.ts.map +1 -1
  21. package/dest/metrics.js +88 -13
  22. package/dest/{event_loop_monitor.d.ts → nodejs_metrics_monitor.d.ts} +5 -2
  23. package/dest/nodejs_metrics_monitor.d.ts.map +1 -0
  24. package/dest/{event_loop_monitor.js → nodejs_metrics_monitor.js} +55 -12
  25. package/dest/noop.d.ts +3 -1
  26. package/dest/noop.d.ts.map +1 -1
  27. package/dest/noop.js +2 -0
  28. package/dest/otel.d.ts +8 -4
  29. package/dest/otel.d.ts.map +1 -1
  30. package/dest/otel.js +79 -19
  31. package/dest/otel_filter_metric_exporter.d.ts +11 -3
  32. package/dest/otel_filter_metric_exporter.d.ts.map +1 -1
  33. package/dest/otel_filter_metric_exporter.js +38 -4
  34. package/dest/otel_resource.d.ts.map +1 -1
  35. package/dest/otel_resource.js +31 -2
  36. package/dest/prom_otel_adapter.d.ts +57 -8
  37. package/dest/prom_otel_adapter.d.ts.map +1 -1
  38. package/dest/prom_otel_adapter.js +143 -43
  39. package/dest/start.js +4 -4
  40. package/dest/telemetry.d.ts +28 -11
  41. package/dest/telemetry.d.ts.map +1 -1
  42. package/dest/telemetry.js +1 -1
  43. package/dest/vendor/otel-pino-stream.d.ts +0 -1
  44. package/dest/vendor/otel-pino-stream.d.ts.map +1 -1
  45. package/dest/vendor/otel-pino-stream.js +2 -2
  46. package/dest/wrappers/fetch.d.ts +1 -1
  47. package/dest/wrappers/fetch.d.ts.map +1 -1
  48. package/dest/wrappers/fetch.js +7 -5
  49. package/dest/wrappers/json_rpc_server.d.ts +1 -1
  50. package/dest/wrappers/json_rpc_server.d.ts.map +1 -1
  51. package/dest/wrappers/l2_block_stream.d.ts +1 -1
  52. package/dest/wrappers/l2_block_stream.d.ts.map +1 -1
  53. package/package.json +16 -13
  54. package/src/attributes.ts +27 -11
  55. package/src/bench.ts +15 -5
  56. package/src/config.ts +41 -2
  57. package/src/index.ts +1 -0
  58. package/src/l1_metrics.ts +80 -0
  59. package/src/lmdb_metrics.ts +24 -3
  60. package/src/metrics.ts +106 -12
  61. package/src/{event_loop_monitor.ts → nodejs_metrics_monitor.ts} +59 -10
  62. package/src/noop.ts +4 -1
  63. package/src/otel.ts +66 -21
  64. package/src/otel_filter_metric_exporter.ts +47 -5
  65. package/src/otel_resource.ts +40 -2
  66. package/src/prom_otel_adapter.ts +191 -59
  67. package/src/start.ts +4 -4
  68. package/src/telemetry.ts +50 -12
  69. package/src/vendor/otel-pino-stream.ts +1 -4
  70. package/src/wrappers/fetch.ts +24 -31
  71. package/src/wrappers/json_rpc_server.ts +1 -1
  72. package/src/wrappers/l2_block_stream.ts +1 -1
  73. package/dest/event_loop_monitor.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,+BAA+B,0CAA0C,CAAC;AACvF,eAAO,MAAM,mBAAm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C,CAAC;AACtE,eAAO,MAAM,wBAAwB,gCAAgC,CAAC;AACtE,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AACvE,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E,eAAO,MAAM,oCAAoC,+CAA+C,CAAC;AACjG,eAAO,MAAM,kCAAkC,8CAA8C,CAAC;AAC9F,eAAO,MAAM,8BAA8B,0CAA0C,CAAC;AACtF,eAAO,MAAM,6BAA6B,yCAAyC,CAAC;AAEpF,eAAO,MAAM,kBAAkB,gCAAgC,CAAC;AAChE,eAAO,MAAM,iCAAiC,4CAA4C,CAAC;AAC3F,eAAO,MAAM,4BAA4B,uCAAuC,CAAC;AAEjF,eAAO,MAAM,iBAAiB,4BAA4B,CAAC;AAC3D,eAAO,MAAM,uBAAuB,kCAAkC,CAAC;AACvE,eAAO,MAAM,0BAA0B,qCAAqC,CAAC;AAE7E,eAAO,MAAM,6BAA6B,wCAAwC,CAAC;AACnF,eAAO,MAAM,6BAA6B,wCAAwC,CAAC;AACnF,eAAO,MAAM,6BAA6B,wCAAwC,CAAC;AACnF,eAAO,MAAM,6BAA6B,wCAAwC,CAAC;AACnF,eAAO,MAAM,6BAA6B,wCAAwC,CAAC"}
package/dest/metrics.js CHANGED
@@ -4,8 +4,13 @@
4
4
  * Prefix metric names with `aztec` and use dots `.` to separate namespaces.
5
5
  *
6
6
  * @see {@link https://opentelemetry.io/docs/specs/semconv/general/metrics/ | OpenTelemetry Metrics} for naming conventions.
7
- */ export const BLOB_SINK_OBJECTS_IN_BLOB_STORE = 'aztec.blob_sink.objects_in_blob_store';
7
+ */ export const BLOB_SINK_STORE_REQUESTS = 'aztec.blob_sink.store_request_count';
8
+ export const BLOB_SINK_RETRIEVE_REQUESTS = 'aztec.blob_sink.retrieve_request_count';
9
+ export const BLOB_SINK_OBJECTS_IN_BLOB_STORE = 'aztec.blob_sink.objects_in_blob_store';
8
10
  export const BLOB_SINK_BLOB_SIZE = 'aztec.blob_sink.blob_size';
11
+ export const BLOB_SINK_ARCHIVE_BLOB_REQUEST_COUNT = 'aztec.blob_sink.archive.block_request_count';
12
+ export const BLOB_SINK_ARCHIVE_BLOCK_REQUEST_COUNT = 'aztec.blob_sink.archive.blob_request_count';
13
+ export const BLOB_SINK_ARCHIVE_BLOB_COUNT = 'aztec.blob_sink.archive.blob_count';
9
14
  /** How long it takes to simulate a circuit */ export const CIRCUIT_SIMULATION_DURATION = 'aztec.circuit.simulation.duration';
10
15
  export const CIRCUIT_SIMULATION_INPUT_SIZE = 'aztec.circuit.simulation.input_size';
11
16
  export const CIRCUIT_SIMULATION_OUTPUT_SIZE = 'aztec.circuit.simulation.output_size';
@@ -22,28 +27,38 @@ export const MEMPOOL_TX_COUNT = 'aztec.mempool.tx_count';
22
27
  export const MEMPOOL_TX_SIZE = 'aztec.mempool.tx_size';
23
28
  export const DB_NUM_ITEMS = 'aztec.db.num_items';
24
29
  export const DB_MAP_SIZE = 'aztec.db.map_size';
30
+ export const DB_PHYSICAL_FILE_SIZE = 'aztec.db.physical_file_size';
25
31
  export const DB_USED_SIZE = 'aztec.db.used_size';
26
32
  export const MEMPOOL_ATTESTATIONS_COUNT = 'aztec.mempool.attestations_count';
27
33
  export const MEMPOOL_ATTESTATIONS_SIZE = 'aztec.mempool.attestations_size';
28
- export const ARCHIVER_SYNC_DURATION = 'aztec.archiver.sync_duration';
29
- export const ARCHIVER_L1_BLOCKS_SYNCED = 'aztec.archiver.l1_blocks_synced';
30
34
  export const ARCHIVER_L1_BLOCK_HEIGHT = 'aztec.archiver.l1_block_height';
31
35
  export const ARCHIVER_BLOCK_HEIGHT = 'aztec.archiver.block_height';
32
- export const ARCHIVER_TX_COUNT = 'aztec.archiver.tx_count';
33
36
  export const ARCHIVER_ROLLUP_PROOF_DELAY = 'aztec.archiver.rollup_proof_delay';
34
37
  export const ARCHIVER_ROLLUP_PROOF_COUNT = 'aztec.archiver.rollup_proof_count';
38
+ export const ARCHIVER_MANA_PER_BLOCK = 'aztec.archiver.block.mana_count';
39
+ export const ARCHIVER_TXS_PER_BLOCK = 'aztec.archiver.block.tx_count';
40
+ export const ARCHIVER_SYNC_PER_BLOCK = 'aztec.archiver.block.sync_per_item_duration';
41
+ export const ARCHIVER_SYNC_BLOCK_COUNT = 'aztec.archiver.block.sync_count';
42
+ export const ARCHIVER_SYNC_PER_MESSAGE = 'aztec.archiver.message.sync_per_item_duration';
43
+ export const ARCHIVER_SYNC_MESSAGE_COUNT = 'aztec.archiver.message.sync_count';
44
+ export const ARCHIVER_PRUNE_DURATION = 'aztec.archiver.prune_duration';
35
45
  export const ARCHIVER_PRUNE_COUNT = 'aztec.archiver.prune_count';
46
+ export const ARCHIVER_TOTAL_TXS = 'aztec.archiver.tx_count';
36
47
  export const NODE_RECEIVE_TX_DURATION = 'aztec.node.receive_tx.duration';
37
48
  export const NODE_RECEIVE_TX_COUNT = 'aztec.node.receive_tx.count';
49
+ export const NODE_SNAPSHOT_DURATION = 'aztec.node.snapshot_duration';
50
+ export const NODE_SNAPSHOT_ERROR_COUNT = 'aztec.node.snapshot_error_count';
38
51
  export const SEQUENCER_STATE_TRANSITION_BUFFER_DURATION = 'aztec.sequencer.state_transition_buffer.duration';
39
52
  export const SEQUENCER_BLOCK_BUILD_DURATION = 'aztec.sequencer.block.build_duration';
40
53
  export const SEQUENCER_BLOCK_BUILD_MANA_PER_SECOND = 'aztec.sequencer.block.build_mana_per_second';
41
54
  export const SEQUENCER_BLOCK_COUNT = 'aztec.sequencer.block.count';
42
- export const SEQUENCER_CURRENT_STATE = 'aztec.sequencer.current.state';
43
- export const SEQUENCER_CURRENT_BLOCK_NUMBER = 'aztec.sequencer.current.block_number';
44
- export const SEQUENCER_CURRENT_BLOCK_SIZE = 'aztec.sequencer.current.block_size';
45
- export const SEQUENCER_TIME_TO_COLLECT_ATTESTATIONS = 'aztec.sequencer.time_to_collect_attestations';
46
- export const SEQUENCER_BLOCK_BUILD_INSERTION_TIME = 'aztec.sequencer.block_builder_tree_insertion_duration';
55
+ export const SEQUENCER_CURRENT_BLOCK_REWARDS = 'aztec.sequencer.current_block_rewards';
56
+ export const SEQUENCER_SLOT_COUNT = 'aztec.sequencer.slot.total_count';
57
+ export const SEQUENCER_FILLED_SLOT_COUNT = 'aztec.sequencer.slot.filled_count';
58
+ export const SEQUENCER_COLLECTED_ATTESTATIONS_COUNT = 'aztec.sequencer.attestations.collected_count';
59
+ export const SEQUENCER_REQUIRED_ATTESTATIONS_COUNT = 'aztec.sequencer.attestations.required_count';
60
+ export const SEQUENCER_COLLECT_ATTESTATIONS_DURATION = 'aztec.sequencer.attestations.collect_duration';
61
+ export const SEQUENCER_COLLECT_ATTESTATIONS_TIME_ALLOWANCE = 'aztec.sequencer.attestations.collect_allowance';
47
62
  export const L1_PUBLISHER_GAS_PRICE = 'aztec.l1_publisher.gas_price';
48
63
  export const L1_PUBLISHER_TX_COUNT = 'aztec.l1_publisher.tx_count';
49
64
  export const L1_PUBLISHER_TX_DURATION = 'aztec.l1_publisher.tx_duration';
@@ -57,12 +72,40 @@ export const L1_PUBLISHER_BLOB_INCLUSION_BLOCKS = 'aztec.l1_publisher.blob_inclu
57
72
  export const L1_PUBLISHER_BLOB_TX_SUCCESS = 'aztec.l1_publisher.blob_tx_success';
58
73
  export const L1_PUBLISHER_BLOB_TX_FAILURE = 'aztec.l1_publisher.blob_tx_failure';
59
74
  export const L1_PUBLISHER_BALANCE = 'aztec.l1_publisher.balance';
75
+ export const L1_PUBLISHER_TX_TOTAL_FEE = 'aztec.l1_publisher.tx_total_fee';
76
+ export const L1_BLOCK_HEIGHT = 'aztec.l1.block_height';
77
+ export const L1_BALANCE_ETH = 'aztec.l1.balance';
78
+ export const L1_GAS_PRICE_WEI = 'aztec.l1.gas_price';
79
+ export const L1_BLOB_BASE_FEE_WEI = 'aztec.l1.blob_base_fee';
80
+ export const L1_TX_MINED_DURATION = 'aztec.l1_tx.mined_duration';
81
+ export const L1_TX_MINED_COUNT = 'aztec.l1_tx.mined_count';
82
+ export const L1_TX_REVERTED_COUNT = 'aztec.l1_tx.reverted_count';
83
+ export const L1_TX_CANCELLED_COUNT = 'aztec.l1_tx.cancelled_count';
84
+ export const L1_TX_NOT_MINED_COUNT = 'aztec.l1_tx.not_mined_count';
85
+ export const L1_TX_ATTEMPTS_UNTIL_MINED = 'aztec.l1_tx.attempts_until_mined';
86
+ export const L1_TX_MAX_PRIORITY_FEE = 'aztec.l1_tx.max_priority_fee';
87
+ export const L1_TX_MAX_FEE = 'aztec.l1_tx.max_fee';
88
+ export const L1_TX_BLOB_FEE = 'aztec.l1_tx.blob_fee';
60
89
  export const PEER_MANAGER_GOODBYES_SENT = 'aztec.peer_manager.goodbyes_sent';
61
90
  export const PEER_MANAGER_GOODBYES_RECEIVED = 'aztec.peer_manager.goodbyes_received';
91
+ export const PEER_MANAGER_PEER_COUNT = 'aztec.peer_manager.peer_count';
62
92
  export const P2P_REQ_RESP_SENT_REQUESTS = 'aztec.p2p.req_resp.sent_requests';
63
93
  export const P2P_REQ_RESP_RECEIVED_REQUESTS = 'aztec.p2p.req_resp.received_requests';
64
94
  export const P2P_REQ_RESP_FAILED_OUTBOUND_REQUESTS = 'aztec.p2p.req_resp.failed_outbound_requests';
65
95
  export const P2P_REQ_RESP_FAILED_INBOUND_REQUESTS = 'aztec.p2p.req_resp.failed_inbound_requests';
96
+ export const P2P_GOSSIP_MESSAGE_VALIDATION_DURATION = 'aztec.p2p.gossip.message_validation_duration';
97
+ export const P2P_GOSSIP_MESSAGE_PREVALIDATION_COUNT = 'aztec.p2p.gossip.message_validation_count';
98
+ export const P2P_GOSSIP_MESSAGE_LATENCY = 'aztec.p2p.gossip.message_latency';
99
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_MIN = 'aztec.p2p.gossip.agg_message_latency_min';
100
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_MAX = 'aztec.p2p.gossip.agg_message_latency_max';
101
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_P50 = 'aztec.p2p.gossip.agg_message_latency_p50';
102
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_P90 = 'aztec.p2p.gossip.agg_message_latency_p90';
103
+ export const P2P_GOSSIP_AGG_MESSAGE_LATENCY_AVG = 'aztec.p2p.gossip.agg_message_latency_avg';
104
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_MIN = 'aztec.p2p.gossip.agg_message_validation_duration_min';
105
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_MAX = 'aztec.p2p.gossip.agg_message_validation_duration_max';
106
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_P50 = 'aztec.p2p.gossip.agg_message_validation_duration_p50';
107
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_P90 = 'aztec.p2p.gossip.agg_message_validation_duration_p90';
108
+ export const P2P_GOSSIP_AGG_MESSAGE_VALIDATION_DURATION_AVG = 'aztec.p2p.gossip.agg_message_validation_duration_avg';
66
109
  export const PUBLIC_PROCESSOR_TX_DURATION = 'aztec.public_processor.tx_duration';
67
110
  export const PUBLIC_PROCESSOR_TX_COUNT = 'aztec.public_processor.tx_count';
68
111
  export const PUBLIC_PROCESSOR_TX_PHASE_COUNT = 'aztec.public_processor.tx_phase_count';
@@ -74,12 +117,17 @@ export const PUBLIC_PROCESSOR_TOTAL_GAS = 'aztec.public_processor.total_gas';
74
117
  export const PUBLIC_PROCESSOR_TOTAL_GAS_HISTOGRAM = 'aztec.public_processor.total_gas_histogram';
75
118
  export const PUBLIC_PROCESSOR_GAS_RATE = 'aztec.public_processor.gas_rate';
76
119
  export const PUBLIC_PROCESSOR_TREE_INSERTION = 'aztec.public_processor.tree_insertion';
120
+ export const PUBLIC_EXECUTOR_PREFIX = 'aztec.public_executor.';
77
121
  export const PUBLIC_EXECUTOR_SIMULATION_COUNT = 'aztec.public_executor.simulation_count';
78
122
  export const PUBLIC_EXECUTOR_SIMULATION_DURATION = 'aztec.public_executor.simulation_duration';
79
123
  export const PUBLIC_EXECUTOR_SIMULATION_MANA_PER_SECOND = 'aztec.public_executor.simulation_mana_per_second';
80
- export const PUBLIC_EXECUTION_SIMULATION_BYTECODE_SIZE = 'aztec.public_executor.simulation_bytecode_size';
81
- export const PUBLIC_EXECUTION_PRIVATE_EFFECTS_INSERTION = 'aztec.public_executor.private_effects_insertion';
124
+ export const PUBLIC_EXECUTOR_SIMULATION_MANA_USED = 'aztec.public_executor.simulation_mana_used';
125
+ export const PUBLIC_EXECUTOR_SIMULATION_TOTAL_INSTRUCTIONS = 'aztec.public_executor.simulation_total_instructions';
126
+ export const PUBLIC_EXECUTOR_TX_HASHING = 'aztec.public_executor.tx_hashing';
127
+ export const PUBLIC_EXECUTOR_PRIVATE_EFFECTS_INSERTION = 'aztec.public_executor.private_effects_insertion';
128
+ export const PUBLIC_EXECUTOR_SIMULATION_BYTECODE_SIZE = 'aztec.public_executor.simulation_bytecode_size';
82
129
  export const PROVING_ORCHESTRATOR_BASE_ROLLUP_INPUTS_DURATION = 'aztec.proving_orchestrator.base_rollup.inputs_duration';
130
+ export const PROVING_ORCHESTRATOR_AVM_FALLBACK_COUNT = 'aztec.proving_orchestrator.avm.fallback_count';
83
131
  export const PROVING_QUEUE_JOB_SIZE = 'aztec.proving_queue.job_size';
84
132
  export const PROVING_QUEUE_SIZE = 'aztec.proving_queue.size';
85
133
  export const PROVING_QUEUE_TOTAL_JOBS = 'aztec.proving_queue.enqueued_jobs_count';
@@ -99,14 +147,17 @@ export const PROVER_NODE_EXECUTION_DURATION = 'aztec.prover_node.execution.durat
99
147
  export const PROVER_NODE_JOB_DURATION = 'aztec.prover_node.job_duration';
100
148
  export const PROVER_NODE_JOB_BLOCKS = 'aztec.prover_node.job_blocks';
101
149
  export const PROVER_NODE_JOB_TRANSACTIONS = 'aztec.prover_node.job_transactions';
150
+ export const PROVER_NODE_REWARDS_TOTAL = 'aztec.prover_node.rewards_total';
151
+ export const PROVER_NODE_REWARDS_PER_EPOCH = 'aztec.prover_node.rewards_per_epoch';
102
152
  export const WORLD_STATE_FORK_DURATION = 'aztec.world_state.fork.duration';
103
153
  export const WORLD_STATE_SYNC_DURATION = 'aztec.world_state.sync.duration';
104
154
  export const WORLD_STATE_MERKLE_TREE_SIZE = 'aztec.world_state.merkle_tree_size';
105
155
  export const WORLD_STATE_DB_SIZE = 'aztec.world_state.db_size';
106
156
  export const WORLD_STATE_DB_MAP_SIZE = 'aztec.world_state.db_map_size';
157
+ export const WORLD_STATE_DB_PHYSICAL_SIZE = 'aztec.world_state.db_physical_size';
107
158
  export const WORLD_STATE_TREE_SIZE = 'aztec.world_state.tree_size';
108
- export const WORLD_STATE_UNFINALISED_HEIGHT = 'aztec.world_state.unfinalised_height';
109
- export const WORLD_STATE_FINALISED_HEIGHT = 'aztec.world_state.finalised_height';
159
+ export const WORLD_STATE_UNFINALIZED_HEIGHT = 'aztec.world_state.unfinalized_height';
160
+ export const WORLD_STATE_FINALIZED_HEIGHT = 'aztec.world_state.finalized_height';
110
161
  export const WORLD_STATE_OLDEST_BLOCK = 'aztec.world_state.oldest_block';
111
162
  export const WORLD_STATE_DB_USED_SIZE = 'aztec.world_state.db_used_size';
112
163
  export const WORLD_STATE_DB_NUM_ITEMS = 'aztec.world_state.db_num_items';
@@ -114,7 +165,12 @@ export const WORLD_STATE_REQUEST_TIME = 'aztec.world_state.request_time';
114
165
  export const WORLD_STATE_CRITICAL_ERROR_COUNT = 'aztec.world_state.critical_error_count';
115
166
  export const PROOF_VERIFIER_COUNT = 'aztec.proof_verifier.count';
116
167
  export const VALIDATOR_RE_EXECUTION_TIME = 'aztec.validator.re_execution_time';
168
+ export const VALIDATOR_RE_EXECUTION_MANA = 'aztec.validator.re_execution_mana';
169
+ export const VALIDATOR_RE_EXECUTION_TX_COUNT = 'aztec.validator.re_execution_tx_count';
117
170
  export const VALIDATOR_FAILED_REEXECUTION_COUNT = 'aztec.validator.failed_reexecution_count';
171
+ export const VALIDATOR_ATTESTATION_SUCCESS_COUNT = 'aztec.validator.attestation_success_count';
172
+ export const VALIDATOR_ATTESTATION_FAILED_BAD_PROPOSAL_COUNT = 'aztec.validator.attestation_failed_bad_proposal_count';
173
+ export const VALIDATOR_ATTESTATION_FAILED_NODE_ISSUE_COUNT = 'aztec.validator.attestation_failed_node_issue_count';
118
174
  export const NODEJS_EVENT_LOOP_DELAY_MIN = 'nodejs.eventloop.delay.min';
119
175
  export const NODEJS_EVENT_LOOP_DELAY_MEAN = 'nodejs.eventloop.delay.mean';
120
176
  export const NODEJS_EVENT_LOOP_DELAY_MAX = 'nodejs.eventloop.delay.max';
@@ -124,3 +180,22 @@ export const NODEJS_EVENT_LOOP_DELAY_P90 = 'nodejs.eventloop.delay.p90';
124
180
  export const NODEJS_EVENT_LOOP_DELAY_P99 = 'nodejs.eventloop.delay.p99';
125
181
  export const NODEJS_EVENT_LOOP_UTILIZATION = 'nodejs.eventloop.utilization';
126
182
  export const NODEJS_EVENT_LOOP_TIME = 'nodejs.eventloop.time';
183
+ export const NODEJS_MEMORY_HEAP_USAGE = 'nodejs.memory.v8_heap.usage';
184
+ export const NODEJS_MEMORY_HEAP_TOTAL = 'nodejs.memory.v8_heap.total';
185
+ export const NODEJS_MEMORY_NATIVE_USAGE = 'nodejs.memory.native.usage';
186
+ export const NODEJS_MEMORY_BUFFER_USAGE = 'nodejs.memory.array_buffer.usage';
187
+ export const TX_PROVIDER_TXS_FROM_PROPOSALS_COUNT = 'aztec.tx_collector.txs_from_proposal_count';
188
+ export const TX_PROVIDER_TXS_FROM_MEMPOOL_COUNT = 'aztec.tx_collector.txs_from_mempool_count';
189
+ export const TX_PROVIDER_TXS_FROM_P2P_COUNT = 'aztec.tx_collector.txs_from_p2p_count';
190
+ export const TX_PROVIDER_MISSING_TXS_COUNT = 'aztec.tx_collector.missing_txs_count';
191
+ export const TX_COLLECTOR_COUNT = 'aztec.tx_collector.tx_count';
192
+ export const TX_COLLECTOR_DURATION_PER_REQUEST = 'aztec.tx_collector.duration_per_request';
193
+ export const TX_COLLECTOR_DURATION_PER_TX = 'aztec.tx_collector.duration_per_tx';
194
+ export const IVC_VERIFIER_TIME = 'aztec.ivc_verifier.time';
195
+ export const IVC_VERIFIER_TOTAL_TIME = 'aztec.ivc_verifier.total_time';
196
+ export const IVC_VERIFIER_FAILURE_COUNT = 'aztec.ivc_verifier.failure_count';
197
+ export const IVC_VERIFIER_AGG_DURATION_MIN = 'aztec.ivc_verifier.agg_duration_min';
198
+ export const IVC_VERIFIER_AGG_DURATION_MAX = 'aztec.ivc_verifier.agg_duration_max';
199
+ export const IVC_VERIFIER_AGG_DURATION_P50 = 'aztec.ivc_verifier.agg_duration_p50';
200
+ export const IVC_VERIFIER_AGG_DURATION_P90 = 'aztec.ivc_verifier.agg_duration_p90';
201
+ export const IVC_VERIFIER_AGG_DURATION_AVG = 'aztec.ivc_verifier.agg_duration_avg';
@@ -2,9 +2,10 @@ import { type Meter } from './telemetry.js';
2
2
  /**
3
3
  * Detector for custom Aztec attributes
4
4
  */
5
- export declare class EventLoopMonitor {
5
+ export declare class NodejsMetricsMonitor {
6
6
  private meter;
7
7
  private eventLoopDelayGauges;
8
+ private memoryGauges;
8
9
  private eventLoopUilization;
9
10
  private eventLoopTime;
10
11
  private started;
@@ -14,5 +15,7 @@ export declare class EventLoopMonitor {
14
15
  start(): void;
15
16
  stop(): void;
16
17
  private measure;
18
+ private measureMemoryUsage;
19
+ private measureEventLoopDelay;
17
20
  }
18
- //# sourceMappingURL=event_loop_monitor.d.ts.map
21
+ //# sourceMappingURL=nodejs_metrics_monitor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodejs_metrics_monitor.d.ts","sourceRoot":"","sources":["../src/nodejs_metrics_monitor.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,KAAK,EAIX,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,qBAAa,oBAAoB;IAuBnB,OAAO,CAAC,KAAK;IAtBzB,OAAO,CAAC,oBAAoB,CAQ1B;IAIF,OAAO,CAAC,YAAY,CAAoE;IAExF,OAAO,CAAC,mBAAmB,CAAkB;IAC7C,OAAO,CAAC,aAAa,CAAgB;IAErC,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,OAAO,CAAmC;IAClD,OAAO,CAAC,cAAc,CAAoB;gBAEtB,KAAK,EAAE,KAAK;IAmDhC,KAAK,IAAI,IAAI;IAcb,IAAI,IAAI,IAAI;IAcZ,OAAO,CAAC,OAAO,CAGb;IAEF,OAAO,CAAC,kBAAkB,CAOxB;IAEF,OAAO,CAAC,qBAAqB,CAyB3B;CACH"}
@@ -4,9 +4,12 @@ import * as Metrics from './metrics.js';
4
4
  import { ValueType } from './telemetry.js';
5
5
  /**
6
6
  * Detector for custom Aztec attributes
7
- */ export class EventLoopMonitor {
7
+ */ export class NodejsMetricsMonitor {
8
8
  meter;
9
9
  eventLoopDelayGauges;
10
+ // skip `rss` because that's already tracked by @opentelemetry/host-metrics
11
+ // description of each field here https://nodejs.org/api/process.html#processmemoryusage
12
+ memoryGauges;
10
13
  eventLoopUilization;
11
14
  eventLoopTime;
12
15
  started;
@@ -16,6 +19,17 @@ import { ValueType } from './telemetry.js';
16
19
  this.meter = meter;
17
20
  this.started = false;
18
21
  this.measure = (obs)=>{
22
+ this.measureMemoryUsage(obs);
23
+ this.measureEventLoopDelay(obs);
24
+ };
25
+ this.measureMemoryUsage = (observer)=>{
26
+ const mem = process.memoryUsage();
27
+ observer.observe(this.memoryGauges.heapUsed, mem.heapUsed);
28
+ observer.observe(this.memoryGauges.heapTotal, mem.heapTotal);
29
+ observer.observe(this.memoryGauges.arrayBuffers, mem.arrayBuffers);
30
+ observer.observe(this.memoryGauges.external, mem.external);
31
+ };
32
+ this.measureEventLoopDelay = (obs)=>{
19
33
  const newELU = performance.eventLoopUtilization();
20
34
  const delta = performance.eventLoopUtilization(newELU, this.lastELU);
21
35
  this.lastELU = newELU;
@@ -26,19 +40,19 @@ import { ValueType } from './telemetry.js';
26
40
  // - https://nodesource.com/blog/event-loop-utilization-nodejs
27
41
  // - https://youtu.be/WetXnEPraYM
28
42
  obs.observe(this.eventLoopUilization, delta.utilization);
29
- this.eventLoopTime.add(Math.floor(delta.idle), {
43
+ this.eventLoopTime.add(Math.trunc(delta.idle), {
30
44
  [Attributes.NODEJS_EVENT_LOOP_STATE]: 'idle'
31
45
  });
32
- this.eventLoopTime.add(Math.floor(delta.active), {
46
+ this.eventLoopTime.add(Math.trunc(delta.active), {
33
47
  [Attributes.NODEJS_EVENT_LOOP_STATE]: 'active'
34
48
  });
35
- obs.observe(this.eventLoopDelayGauges.min, Math.floor(this.eventLoopDelay.min));
36
- obs.observe(this.eventLoopDelayGauges.mean, Math.floor(this.eventLoopDelay.mean));
37
- obs.observe(this.eventLoopDelayGauges.max, Math.floor(this.eventLoopDelay.max));
38
- obs.observe(this.eventLoopDelayGauges.stddev, Math.floor(this.eventLoopDelay.stddev));
39
- obs.observe(this.eventLoopDelayGauges.p50, Math.floor(this.eventLoopDelay.percentile(50)));
40
- obs.observe(this.eventLoopDelayGauges.p90, Math.floor(this.eventLoopDelay.percentile(90)));
41
- obs.observe(this.eventLoopDelayGauges.p99, Math.floor(this.eventLoopDelay.percentile(99)));
49
+ safeObserveInt(obs, this.eventLoopDelayGauges.min, this.eventLoopDelay.min);
50
+ safeObserveInt(obs, this.eventLoopDelayGauges.mean, this.eventLoopDelay.mean);
51
+ safeObserveInt(obs, this.eventLoopDelayGauges.max, this.eventLoopDelay.max);
52
+ safeObserveInt(obs, this.eventLoopDelayGauges.stddev, this.eventLoopDelay.stddev);
53
+ safeObserveInt(obs, this.eventLoopDelayGauges.p50, this.eventLoopDelay.percentile(50));
54
+ safeObserveInt(obs, this.eventLoopDelayGauges.p90, this.eventLoopDelay.percentile(90));
55
+ safeObserveInt(obs, this.eventLoopDelayGauges.p99, this.eventLoopDelay.percentile(99));
42
56
  this.eventLoopDelay.reset();
43
57
  };
44
58
  const nsObsGauge = (name, description)=>meter.createObservableGauge(name, {
@@ -65,6 +79,24 @@ import { ValueType } from './telemetry.js';
65
79
  description: 'How much time the event loop has spent in a given state'
66
80
  });
67
81
  this.eventLoopDelay = monitorEventLoopDelay();
82
+ this.memoryGauges = {
83
+ heapUsed: meter.createObservableGauge(Metrics.NODEJS_MEMORY_HEAP_USAGE, {
84
+ unit: 'By',
85
+ description: 'Memory used by the V8 heap'
86
+ }),
87
+ heapTotal: meter.createObservableGauge(Metrics.NODEJS_MEMORY_HEAP_TOTAL, {
88
+ unit: 'By',
89
+ description: 'The max size the V8 heap can grow to'
90
+ }),
91
+ arrayBuffers: meter.createObservableGauge(Metrics.NODEJS_MEMORY_BUFFER_USAGE, {
92
+ unit: 'By',
93
+ description: 'Memory allocated for buffers (includes native memory used)'
94
+ }),
95
+ external: meter.createObservableGauge(Metrics.NODEJS_MEMORY_NATIVE_USAGE, {
96
+ unit: 'By',
97
+ description: 'Memory allocated for native C++ objects'
98
+ })
99
+ };
68
100
  }
69
101
  start() {
70
102
  if (this.started) {
@@ -74,7 +106,8 @@ import { ValueType } from './telemetry.js';
74
106
  this.eventLoopDelay.enable();
75
107
  this.meter.addBatchObservableCallback(this.measure, [
76
108
  this.eventLoopUilization,
77
- ...Object.values(this.eventLoopDelayGauges)
109
+ ...Object.values(this.eventLoopDelayGauges),
110
+ ...Object.values(this.memoryGauges)
78
111
  ]);
79
112
  }
80
113
  stop() {
@@ -83,11 +116,21 @@ import { ValueType } from './telemetry.js';
83
116
  }
84
117
  this.meter.removeBatchObservableCallback(this.measure, [
85
118
  this.eventLoopUilization,
86
- ...Object.values(this.eventLoopDelayGauges)
119
+ ...Object.values(this.eventLoopDelayGauges),
120
+ ...Object.values(this.memoryGauges)
87
121
  ]);
88
122
  this.eventLoopDelay.disable();
89
123
  this.eventLoopDelay.reset();
90
124
  this.lastELU = undefined;
91
125
  }
92
126
  measure;
127
+ measureMemoryUsage;
128
+ measureEventLoopDelay;
129
+ }
130
+ function safeObserveInt(observer, metric, value, attrs) {
131
+ // discard NaN, Infinity, -Infinity
132
+ if (!Number.isFinite(value)) {
133
+ return;
134
+ }
135
+ observer.observe(metric, Math.trunc(value), attrs);
93
136
  }
package/dest/noop.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { type Meter, type Span, type Tracer } from '@opentelemetry/api';
2
2
  import type { TelemetryClient } from './telemetry.js';
3
3
  export declare class NoopTelemetryClient implements TelemetryClient {
4
+ setExportedPublicTelemetry(_prefixes: string[]): void;
5
+ setPublicTelemetryCollectFrom(_roles: string[]): void;
4
6
  getMeter(): Meter;
5
7
  getTracer(): Tracer;
6
8
  stop(): Promise<void>;
@@ -9,6 +11,6 @@ export declare class NoopTelemetryClient implements TelemetryClient {
9
11
  }
10
12
  export declare class NoopTracer implements Tracer {
11
13
  startSpan(): Span;
12
- startActiveSpan<F extends (...args: any[]) => any>(_name: string, ...args: (unknown | F)[]): ReturnType<F>;
14
+ startActiveSpan<F extends (...args: any[]) => any>(_name: string, ...args: unknown[]): ReturnType<F>;
13
15
  }
14
16
  //# sourceMappingURL=noop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../src/noop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAoB,KAAK,MAAM,EAAmB,MAAM,oBAAoB,CAAC;AAE3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,qBAAa,mBAAoB,YAAW,eAAe;IACzD,QAAQ,IAAI,KAAK;IAIjB,SAAS,IAAI,MAAM;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,SAAS;CAGV;AAKD,qBAAa,UAAW,YAAW,MAAM;IACvC,SAAS,IAAI,IAAI;IAIjB,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC;CAK3G"}
1
+ {"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../src/noop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,IAAI,EAAoB,KAAK,MAAM,EAAmB,MAAM,oBAAoB,CAAC;AAE3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,qBAAa,mBAAoB,YAAW,eAAe;IACzD,0BAA0B,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI;IACrD,6BAA6B,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;IAErD,QAAQ,IAAI,KAAK;IAIjB,SAAS,IAAI,MAAM;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,SAAS;CAGV;AAKD,qBAAa,UAAW,YAAW,MAAM;IACvC,SAAS,IAAI,IAAI;IAIjB,eAAe,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC;CAKrG"}
package/dest/noop.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { createNoopMeter } from '@opentelemetry/api';
2
2
  export class NoopTelemetryClient {
3
+ setExportedPublicTelemetry(_prefixes) {}
4
+ setPublicTelemetryCollectFrom(_roles) {}
3
5
  getMeter() {
4
6
  return createNoopMeter();
5
7
  }
package/dest/otel.d.ts CHANGED
@@ -5,7 +5,8 @@ import type { IResource } from '@opentelemetry/resources';
5
5
  import type { LoggerProvider } from '@opentelemetry/sdk-logs';
6
6
  import { MeterProvider, type PeriodicExportingMetricReaderOptions } from '@opentelemetry/sdk-metrics';
7
7
  import type { TelemetryClientConfig } from './config.js';
8
- import { EventLoopMonitor } from './event_loop_monitor.js';
8
+ import { NodejsMetricsMonitor } from './nodejs_metrics_monitor.js';
9
+ import { PublicOtelFilterMetricExporter } from './otel_filter_metric_exporter.js';
9
10
  import type { TelemetryClient } from './telemetry.js';
10
11
  export type OpenTelemetryClientFactory = (resource: IResource, log: Logger) => OpenTelemetryClient;
11
12
  export declare class OpenTelemetryClient implements TelemetryClient {
@@ -13,19 +14,22 @@ export declare class OpenTelemetryClient implements TelemetryClient {
13
14
  private meterProvider;
14
15
  private traceProvider;
15
16
  private loggerProvider;
17
+ private publicMetricExporter;
16
18
  private log;
17
19
  hostMetrics: HostMetrics | undefined;
18
- eventLoopMonitor: EventLoopMonitor | undefined;
20
+ nodejsMetricsMonitor: NodejsMetricsMonitor | undefined;
19
21
  private meters;
20
22
  private tracers;
21
- protected constructor(resource: IResource, meterProvider: MeterProvider, traceProvider: TracerProvider, loggerProvider: LoggerProvider | undefined, log: Logger);
23
+ protected constructor(resource: IResource, meterProvider: MeterProvider, traceProvider: TracerProvider, loggerProvider: LoggerProvider | undefined, publicMetricExporter: PublicOtelFilterMetricExporter | undefined, log: Logger);
24
+ setExportedPublicTelemetry(metrics: string[]): void;
25
+ setPublicTelemetryCollectFrom(roles: string[]): void;
22
26
  getMeter(name: string): Meter;
23
27
  getTracer(name: string): Tracer;
24
28
  start(): void;
25
29
  isEnabled(): boolean;
26
30
  flush(): Promise<void>;
27
31
  stop(): Promise<void>;
28
- static createMeterProvider(resource: IResource, options: Partial<PeriodicExportingMetricReaderOptions>): MeterProvider;
32
+ static createMeterProvider(resource: IResource, exporters: Array<PeriodicExportingMetricReaderOptions>): MeterProvider;
29
33
  private static getCustomClientFactory;
30
34
  static createAndStart(config: TelemetryClientConfig, log: Logger): OpenTelemetryClient;
31
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"otel.d.ts","sourceRoot":"","sources":["../src/otel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAA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E,WAAW,GAAG,SAAS,CAAC;IACrC,oBAAoB,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACvD,OAAO,CAAC,MAAM,CAAgD;IAC9D,OAAO,CAAC,OAAO,CAAkD;IAEjE,SAAS,aACC,QAAQ,EAAE,SAAS,EACnB,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,cAAc,EAC7B,cAAc,EAAE,cAAc,GAAG,SAAS,EAC1C,oBAAoB,EAAE,8BAA8B,GAAG,SAAS,EAChE,GAAG,EAAE,MAAM;IAGrB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAInD,6BAA6B,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAIpD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAS7B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IASxB,KAAK;IA+BL,SAAS;IAIH,KAAK;IAQL,IAAI;WAkBH,mBAAmB,CAC/B,QAAQ,EAAE,SAAS,EACnB,SAAS,EAAE,KAAK,CAAC,oCAAoC,CAAC,GACrD,aAAa;IAiIhB,OAAO,CAAC,MAAM,CAAC,sBAAsB;WAiDvB,cAAc,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,GAAG,mBAAmB;CAS9F"}
package/dest/otel.js CHANGED
@@ -6,8 +6,8 @@ import { HostMetrics } from '@opentelemetry/host-metrics';
6
6
  import { ExplicitBucketHistogramAggregation, InstrumentType, MeterProvider, PeriodicExportingMetricReader, View } from '@opentelemetry/sdk-metrics';
7
7
  import { BatchSpanProcessor, NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
8
8
  import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from '@opentelemetry/semantic-conventions';
9
- import { EventLoopMonitor } from './event_loop_monitor.js';
10
- import { OtelFilterMetricExporter } from './otel_filter_metric_exporter.js';
9
+ import { NodejsMetricsMonitor } from './nodejs_metrics_monitor.js';
10
+ import { OtelFilterMetricExporter, PublicOtelFilterMetricExporter } from './otel_filter_metric_exporter.js';
11
11
  import { registerOtelLoggerProvider } from './otel_logger_provider.js';
12
12
  import { getOtelResource } from './otel_resource.js';
13
13
  export class OpenTelemetryClient {
@@ -15,20 +15,28 @@ export class OpenTelemetryClient {
15
15
  meterProvider;
16
16
  traceProvider;
17
17
  loggerProvider;
18
+ publicMetricExporter;
18
19
  log;
19
20
  hostMetrics;
20
- eventLoopMonitor;
21
+ nodejsMetricsMonitor;
21
22
  meters;
22
23
  tracers;
23
- constructor(resource, meterProvider, traceProvider, loggerProvider, log){
24
+ constructor(resource, meterProvider, traceProvider, loggerProvider, publicMetricExporter, log){
24
25
  this.resource = resource;
25
26
  this.meterProvider = meterProvider;
26
27
  this.traceProvider = traceProvider;
27
28
  this.loggerProvider = loggerProvider;
29
+ this.publicMetricExporter = publicMetricExporter;
28
30
  this.log = log;
29
31
  this.meters = new Map();
30
32
  this.tracers = new Map();
31
33
  }
34
+ setExportedPublicTelemetry(metrics) {
35
+ this.publicMetricExporter?.setMetricPrefixes(metrics);
36
+ }
37
+ setPublicTelemetryCollectFrom(roles) {
38
+ this.publicMetricExporter?.setAllowedRoles(roles);
39
+ }
32
40
  getMeter(name) {
33
41
  let meter = this.meters.get(name);
34
42
  if (!meter) {
@@ -63,9 +71,9 @@ export class OpenTelemetryClient {
63
71
  name: this.resource.attributes[ATTR_SERVICE_NAME],
64
72
  meterProvider: this.meterProvider
65
73
  });
66
- this.eventLoopMonitor = new EventLoopMonitor(this.meterProvider.getMeter(this.resource.attributes[ATTR_SERVICE_NAME]));
74
+ this.nodejsMetricsMonitor = new NodejsMetricsMonitor(this.meterProvider.getMeter(this.resource.attributes[ATTR_SERVICE_NAME]));
67
75
  this.hostMetrics.start();
68
- this.eventLoopMonitor.start();
76
+ this.nodejsMetricsMonitor.start();
69
77
  }
70
78
  isEnabled() {
71
79
  return true;
@@ -78,7 +86,7 @@ export class OpenTelemetryClient {
78
86
  ]);
79
87
  }
80
88
  async stop() {
81
- this.eventLoopMonitor?.stop();
89
+ this.nodejsMetricsMonitor?.stop();
82
90
  const flushAndShutdown = async (provider)=>{
83
91
  if (!provider) {
84
92
  return;
@@ -92,14 +100,47 @@ export class OpenTelemetryClient {
92
100
  this.traceProvider instanceof NodeTracerProvider ? flushAndShutdown(this.traceProvider) : Promise.resolve()
93
101
  ]);
94
102
  }
95
- static createMeterProvider(resource, options) {
103
+ static createMeterProvider(resource, exporters) {
96
104
  return new MeterProvider({
97
105
  resource,
98
- readers: options.exporter ? [
99
- new PeriodicExportingMetricReader(options)
100
- ] : [],
106
+ readers: exporters.map((options)=>new PeriodicExportingMetricReader(options)),
101
107
  views: [
102
108
  // Every histogram matching the selector (type + unit) gets these custom buckets assigned
109
+ new View({
110
+ instrumentType: InstrumentType.HISTOGRAM,
111
+ instrumentUnit: 'Mmana',
112
+ aggregation: new ExplicitBucketHistogramAggregation([
113
+ 0.1,
114
+ 0.5,
115
+ 1,
116
+ 2,
117
+ 4,
118
+ 8,
119
+ 10,
120
+ 25,
121
+ 50,
122
+ 100,
123
+ 500,
124
+ 1000,
125
+ 5000,
126
+ 10000
127
+ ], true)
128
+ }),
129
+ new View({
130
+ instrumentType: InstrumentType.HISTOGRAM,
131
+ instrumentUnit: 'tx',
132
+ aggregation: new ExplicitBucketHistogramAggregation(// TPS
133
+ [
134
+ 0.1 * 36,
135
+ 0.2 * 36,
136
+ 0.5 * 36,
137
+ 1 * 36,
138
+ 2 * 36,
139
+ 5 * 36,
140
+ 10 * 36,
141
+ 15 * 36
142
+ ].map(Math.ceil), true)
143
+ }),
103
144
  new View({
104
145
  instrumentType: InstrumentType.HISTOGRAM,
105
146
  instrumentUnit: 's',
@@ -298,15 +339,34 @@ export class OpenTelemetryClient {
298
339
  ] : []
299
340
  });
300
341
  tracerProvider.register();
301
- const meterProvider = OpenTelemetryClient.createMeterProvider(resource, {
302
- exporter: config.metricsCollectorUrl ? new OtelFilterMetricExporter(new OTLPMetricExporter({
303
- url: config.metricsCollectorUrl.href
304
- }), config.otelExcludeMetrics ?? []) : undefined,
305
- exportTimeoutMillis: config.otelExportTimeoutMs,
306
- exportIntervalMillis: config.otelCollectIntervalMs
307
- });
342
+ const exporters = [];
343
+ if (config.metricsCollectorUrl) {
344
+ exporters.push({
345
+ exporter: new OtelFilterMetricExporter(new OTLPMetricExporter({
346
+ url: config.metricsCollectorUrl.href
347
+ }), config.otelExcludeMetrics, 'deny'),
348
+ exportTimeoutMillis: config.otelExportTimeoutMs,
349
+ exportIntervalMillis: config.otelCollectIntervalMs
350
+ });
351
+ }
352
+ let publicExporter;
353
+ if (config.publicMetricsCollectorUrl && !config.publicMetricsOptOut) {
354
+ log.info(`Exporting public metrics: ${config.publicIncludeMetrics}`, {
355
+ publicMetrics: config.publicIncludeMetrics,
356
+ collectorUrl: config.publicMetricsCollectorUrl
357
+ });
358
+ publicExporter = new PublicOtelFilterMetricExporter(config.publicMetricsCollectFrom, new OTLPMetricExporter({
359
+ url: config.publicMetricsCollectorUrl.href
360
+ }), config.publicIncludeMetrics);
361
+ exporters.push({
362
+ exporter: publicExporter,
363
+ exportTimeoutMillis: config.otelExportTimeoutMs,
364
+ exportIntervalMillis: config.otelCollectIntervalMs
365
+ });
366
+ }
367
+ const meterProvider = OpenTelemetryClient.createMeterProvider(resource, exporters);
308
368
  const loggerProvider = registerOtelLoggerProvider(resource, config.logsCollectorUrl);
309
- return new OpenTelemetryClient(resource, meterProvider, tracerProvider, loggerProvider, log);
369
+ return new OpenTelemetryClient(resource, meterProvider, tracerProvider, loggerProvider, publicExporter, log);
310
370
  };
311
371
  }
312
372
  static createAndStart(config, log) {
@@ -1,12 +1,20 @@
1
- import type { ExportResult } from '@opentelemetry/core';
1
+ import { type ExportResult } from '@opentelemetry/core';
2
2
  import type { PushMetricExporter, ResourceMetrics } from '@opentelemetry/sdk-metrics';
3
3
  export declare class OtelFilterMetricExporter implements PushMetricExporter {
4
4
  private readonly exporter;
5
- private readonly excludeMetricPrefixes;
6
- constructor(exporter: PushMetricExporter, excludeMetricPrefixes: string[]);
5
+ private metricPrefix;
6
+ private readonly filter;
7
+ constructor(exporter: PushMetricExporter, metricPrefix: string[], filter?: 'allow' | 'deny');
7
8
  export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void;
8
9
  private filterMetrics;
9
10
  forceFlush(): Promise<void>;
10
11
  shutdown(): Promise<void>;
12
+ setMetricPrefixes(metrics: string[]): void;
13
+ }
14
+ export declare class PublicOtelFilterMetricExporter extends OtelFilterMetricExporter {
15
+ private allowedRoles;
16
+ constructor(allowedRoles: string[], exporter: PushMetricExporter, metricPrefix: string[]);
17
+ export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void;
18
+ setAllowedRoles(roles: string[]): void;
11
19
  }
12
20
  //# sourceMappingURL=otel_filter_metric_exporter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"otel_filter_metric_exporter.d.ts","sourceRoot":"","sources":["../src/otel_filter_metric_exporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAc,kBAAkB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElG,qBAAa,wBAAyB,YAAW,kBAAkB;IACrD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAAsB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;gBAApE,QAAQ,EAAE,kBAAkB,EAAmB,qBAAqB,EAAE,MAAM,EAAE;IASpG,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,IAAI;IAW7F,OAAO,CAAC,aAAa;IAMd,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGjC"}
1
+ {"version":3,"file":"otel_filter_metric_exporter.d.ts","sourceRoot":"","sources":["../src/otel_filter_metric_exporter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