@aztec/telemetry-client 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2

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 (51) hide show
  1. package/dest/attributes.js +66 -0
  2. package/dest/aztec_resource_detector.js +18 -0
  3. package/dest/bench.js +98 -0
  4. package/dest/config.js +66 -0
  5. package/dest/event_loop_monitor.js +93 -0
  6. package/dest/histogram_utils.js +47 -0
  7. package/dest/index.js +10 -0
  8. package/dest/lmdb_metrics.js +42 -0
  9. package/dest/metrics.js +123 -0
  10. package/dest/noop.js +71 -0
  11. package/dest/otel.js +237 -0
  12. package/dest/otel_filter_metric_exporter.js +33 -0
  13. package/dest/otel_logger_provider.js +25 -0
  14. package/dest/otel_propagation.js +44 -0
  15. package/dest/otel_resource.js +16 -0
  16. package/dest/prom_otel_adapter.js +183 -0
  17. package/dest/start.js +24 -0
  18. package/dest/telemetry.js +116 -0
  19. package/dest/vendor/attributes.js +5 -0
  20. package/dest/vendor/otel-pino-stream.js +229 -0
  21. package/dest/with_tracer.js +32 -0
  22. package/dest/wrappers/fetch.js +39 -0
  23. package/dest/wrappers/index.js +3 -0
  24. package/dest/wrappers/json_rpc_server.js +11 -0
  25. package/dest/wrappers/l2_block_stream.js +26 -0
  26. package/package.json +92 -0
  27. package/src/attributes.ts +113 -0
  28. package/src/aztec_resource_detector.ts +28 -0
  29. package/src/bench.ts +153 -0
  30. package/src/config.ts +89 -0
  31. package/src/event_loop_monitor.ts +119 -0
  32. package/src/histogram_utils.ts +50 -0
  33. package/src/index.ts +10 -0
  34. package/src/lmdb_metrics.ts +45 -0
  35. package/src/metrics.ts +151 -0
  36. package/src/noop.ts +91 -0
  37. package/src/otel.ts +299 -0
  38. package/src/otel_filter_metric_exporter.ts +38 -0
  39. package/src/otel_logger_provider.ts +31 -0
  40. package/src/otel_propagation.ts +50 -0
  41. package/src/otel_resource.ts +26 -0
  42. package/src/prom_otel_adapter.ts +326 -0
  43. package/src/start.ts +33 -0
  44. package/src/telemetry.ts +267 -0
  45. package/src/vendor/attributes.ts +5 -0
  46. package/src/vendor/otel-pino-stream.ts +282 -0
  47. package/src/with_tracer.ts +35 -0
  48. package/src/wrappers/fetch.ts +52 -0
  49. package/src/wrappers/index.ts +3 -0
  50. package/src/wrappers/json_rpc_server.ts +15 -0
  51. package/src/wrappers/l2_block_stream.ts +37 -0
package/src/bench.ts ADDED
@@ -0,0 +1,153 @@
1
+ import {
2
+ type BatchObservableCallback,
3
+ type Context,
4
+ type MetricOptions,
5
+ type Observable,
6
+ type ValueType,
7
+ } from '@opentelemetry/api';
8
+
9
+ import { NoopTracer } from './noop.js';
10
+ import {
11
+ type AttributesType,
12
+ type Gauge,
13
+ type Histogram,
14
+ type Meter,
15
+ type MetricsType,
16
+ type ObservableGauge,
17
+ type ObservableUpDownCounter,
18
+ type TelemetryClient,
19
+ type Tracer,
20
+ type UpDownCounter,
21
+ } from './telemetry.js';
22
+
23
+ export type BenchmarkMetricsType = {
24
+ name: string;
25
+ metrics: {
26
+ name: string;
27
+ type: 'gauge' | 'counter' | 'histogram';
28
+ description?: string;
29
+ unit?: string;
30
+ valueType?: ValueType;
31
+ points: BenchmarkDataPoint[];
32
+ }[];
33
+ }[];
34
+
35
+ export class BenchmarkTelemetryClient implements TelemetryClient {
36
+ private meters: InMemoryPlainMeter[] = [];
37
+
38
+ getMeter(name: string): Meter {
39
+ const meter = new InMemoryPlainMeter(name);
40
+ this.meters.push(meter);
41
+ return meter;
42
+ }
43
+
44
+ getTracer(): Tracer {
45
+ return new NoopTracer();
46
+ }
47
+
48
+ stop(): Promise<void> {
49
+ return Promise.resolve();
50
+ }
51
+
52
+ flush(): Promise<void> {
53
+ return Promise.resolve();
54
+ }
55
+
56
+ isEnabled() {
57
+ return true;
58
+ }
59
+
60
+ getMeters(): BenchmarkMetricsType {
61
+ return this.meters;
62
+ }
63
+
64
+ clear() {
65
+ this.meters.forEach(meter => meter.clear());
66
+ }
67
+ }
68
+
69
+ class InMemoryPlainMeter implements Meter {
70
+ public readonly metrics: InMemoryPlainMetric[] = [];
71
+
72
+ constructor(public readonly name: string) {}
73
+
74
+ clear() {
75
+ this.metrics.forEach(metric => metric.clear());
76
+ }
77
+
78
+ createGauge(name: MetricsType, options?: MetricOptions | undefined): Gauge {
79
+ return this.createMetric('gauge', name, options);
80
+ }
81
+
82
+ createObservableGauge(name: MetricsType, options?: MetricOptions | undefined): ObservableGauge {
83
+ return this.createMetric('gauge', name, options);
84
+ }
85
+
86
+ createHistogram(name: MetricsType, options?: MetricOptions | undefined): Histogram {
87
+ return this.createMetric('histogram', name, options);
88
+ }
89
+
90
+ createUpDownCounter(name: MetricsType, options?: MetricOptions | undefined): UpDownCounter {
91
+ return this.createMetric('counter', name, options);
92
+ }
93
+
94
+ createObservableUpDownCounter(name: MetricsType, options?: MetricOptions | undefined): ObservableUpDownCounter {
95
+ return this.createMetric('counter', name, options);
96
+ }
97
+
98
+ private createMetric(type: 'gauge' | 'counter' | 'histogram', name: string, options?: MetricOptions) {
99
+ const metric = new InMemoryPlainMetric(type, name, options);
100
+ this.metrics.push(metric);
101
+ return metric;
102
+ }
103
+
104
+ addBatchObservableCallback(
105
+ _callback: BatchObservableCallback<AttributesType>,
106
+ _observables: Observable<AttributesType>[],
107
+ ): void {}
108
+
109
+ removeBatchObservableCallback(
110
+ _callback: BatchObservableCallback<AttributesType>,
111
+ _observables: Observable<AttributesType>[],
112
+ ): void {}
113
+ }
114
+
115
+ export type BenchmarkDataPoint = { value: number; attributes?: AttributesType; context?: Context };
116
+
117
+ class InMemoryPlainMetric {
118
+ public readonly points: BenchmarkDataPoint[] = [];
119
+
120
+ public readonly description?: string;
121
+ public readonly unit?: string;
122
+ public readonly valueType?: ValueType;
123
+
124
+ constructor(
125
+ public readonly type: 'gauge' | 'counter' | 'histogram',
126
+ public readonly name: string,
127
+ options?: MetricOptions,
128
+ ) {
129
+ this.description = options?.description;
130
+ this.unit = options?.unit;
131
+ this.valueType = options?.valueType;
132
+ }
133
+
134
+ add(value: number, attributes?: AttributesType, context?: Context): void {
135
+ this.points.push({ value, attributes, context });
136
+ }
137
+
138
+ record(value: number, attributes?: AttributesType, context?: Context): void {
139
+ this.points.push({ value, attributes, context });
140
+ }
141
+
142
+ addCallback() {}
143
+
144
+ removeCallback() {}
145
+
146
+ getPoints(): BenchmarkDataPoint[] {
147
+ return this.points;
148
+ }
149
+
150
+ clear() {
151
+ this.points.splice(0, this.points.length);
152
+ }
153
+ }
package/src/config.ts ADDED
@@ -0,0 +1,89 @@
1
+ import { type ConfigMappingsType, booleanConfigHelper, getConfigFromMappings } from '@aztec/foundation/config';
2
+
3
+ export interface TelemetryClientConfig {
4
+ useGcloudObservability: boolean;
5
+ metricsCollectorUrl?: URL;
6
+ tracesCollectorUrl?: URL;
7
+ logsCollectorUrl?: URL;
8
+ serviceName: string;
9
+ networkName: string;
10
+ otelCollectIntervalMs: number;
11
+ otelExportTimeoutMs: number;
12
+ k8sPodUid?: string;
13
+ k8sPodName?: string;
14
+ k8sNamespaceName?: string;
15
+ otelExcludeMetrics?: string[];
16
+ }
17
+
18
+ export const telemetryClientConfigMappings: ConfigMappingsType<TelemetryClientConfig> = {
19
+ useGcloudObservability: {
20
+ env: 'USE_GCLOUD_OBSERVABILITY',
21
+ description: 'Whether to use GCP observability',
22
+ ...booleanConfigHelper(false),
23
+ },
24
+ metricsCollectorUrl: {
25
+ env: 'OTEL_EXPORTER_OTLP_METRICS_ENDPOINT',
26
+ description: 'The URL of the telemetry collector for metrics',
27
+ parseEnv: (val: string) => val && new URL(val),
28
+ },
29
+ tracesCollectorUrl: {
30
+ env: 'OTEL_EXPORTER_OTLP_TRACES_ENDPOINT',
31
+ description: 'The URL of the telemetry collector for traces',
32
+ parseEnv: (val: string) => val && new URL(val),
33
+ },
34
+ logsCollectorUrl: {
35
+ env: 'OTEL_EXPORTER_OTLP_LOGS_ENDPOINT',
36
+ description: 'The URL of the telemetry collector for logs',
37
+ parseEnv: (val: string) => val && new URL(val),
38
+ },
39
+ serviceName: {
40
+ env: 'OTEL_SERVICE_NAME',
41
+ description: 'The name of the service (attached as metadata to collected metrics)',
42
+ defaultValue: 'aztec',
43
+ },
44
+ networkName: {
45
+ env: 'NETWORK_NAME',
46
+ description: 'The network ID of the telemetry service',
47
+ defaultValue: 'local',
48
+ },
49
+ otelCollectIntervalMs: {
50
+ env: 'OTEL_COLLECT_INTERVAL_MS',
51
+ description: 'The interval at which to collect metrics',
52
+ defaultValue: 60000, // Default extracted from otel client
53
+ parseEnv: (val: string) => parseInt(val),
54
+ },
55
+ otelExportTimeoutMs: {
56
+ env: 'OTEL_EXPORT_TIMEOUT_MS',
57
+ description: 'The timeout for exporting metrics',
58
+ defaultValue: 30000, // Default extracted from otel client
59
+ parseEnv: (val: string) => parseInt(val),
60
+ },
61
+ otelExcludeMetrics: {
62
+ env: 'OTEL_EXCLUDE_METRICS',
63
+ description: 'A list of metric prefixes to exclude from export',
64
+ parseEnv: (val: string) =>
65
+ val
66
+ ? val
67
+ .split(',')
68
+ .map(s => s.trim())
69
+ .filter(s => s.length > 0)
70
+ : [],
71
+ defaultValue: [],
72
+ },
73
+ k8sPodUid: {
74
+ env: 'K8S_POD_UID',
75
+ description: 'The UID of the Kubernetes pod (injected automatically by k8s)',
76
+ },
77
+ k8sPodName: {
78
+ env: 'K8S_POD_NAME',
79
+ description: 'The name of the Kubernetes pod (injected automatically by k8s)',
80
+ },
81
+ k8sNamespaceName: {
82
+ env: 'K8S_NAMESPACE_NAME',
83
+ description: 'The name of the Kubernetes namespace (injected automatically by k8s)',
84
+ },
85
+ };
86
+
87
+ export function getConfigEnvVars(): TelemetryClientConfig {
88
+ return getConfigFromMappings<TelemetryClientConfig>(telemetryClientConfigMappings);
89
+ }
@@ -0,0 +1,119 @@
1
+ import { type EventLoopUtilization, type IntervalHistogram, monitorEventLoopDelay, performance } from 'node:perf_hooks';
2
+
3
+ import * as Attributes from './attributes.js';
4
+ import * as Metrics from './metrics.js';
5
+ import {
6
+ type BatchObservableResult,
7
+ type Meter,
8
+ type ObservableGauge,
9
+ type UpDownCounter,
10
+ ValueType,
11
+ } from './telemetry.js';
12
+
13
+ /**
14
+ * Detector for custom Aztec attributes
15
+ */
16
+ export class EventLoopMonitor {
17
+ private eventLoopDelayGauges: {
18
+ min: ObservableGauge;
19
+ max: ObservableGauge;
20
+ mean: ObservableGauge;
21
+ stddev: ObservableGauge;
22
+ p50: ObservableGauge;
23
+ p90: ObservableGauge;
24
+ p99: ObservableGauge;
25
+ };
26
+
27
+ private eventLoopUilization: ObservableGauge;
28
+ private eventLoopTime: UpDownCounter;
29
+
30
+ private started = false;
31
+
32
+ private lastELU: EventLoopUtilization | undefined;
33
+ private eventLoopDelay: IntervalHistogram;
34
+
35
+ constructor(private meter: Meter) {
36
+ const nsObsGauge = (name: (typeof Metrics)[keyof typeof Metrics], description: string) =>
37
+ meter.createObservableGauge(name, {
38
+ unit: 'ns',
39
+ valueType: ValueType.INT,
40
+ description,
41
+ });
42
+
43
+ this.eventLoopDelayGauges = {
44
+ min: nsObsGauge(Metrics.NODEJS_EVENT_LOOP_DELAY_MIN, 'Minimum delay of the event loop'),
45
+ mean: nsObsGauge(Metrics.NODEJS_EVENT_LOOP_DELAY_MEAN, 'Mean delay of the event loop'),
46
+ max: nsObsGauge(Metrics.NODEJS_EVENT_LOOP_DELAY_MAX, 'Max delay of the event loop'),
47
+ stddev: nsObsGauge(Metrics.NODEJS_EVENT_LOOP_DELAY_STDDEV, 'Stddev delay of the event loop'),
48
+ p50: nsObsGauge(Metrics.NODEJS_EVENT_LOOP_DELAY_P50, 'P50 delay of the event loop'),
49
+ p90: nsObsGauge(Metrics.NODEJS_EVENT_LOOP_DELAY_P90, 'P90 delay of the event loop'),
50
+ p99: nsObsGauge(Metrics.NODEJS_EVENT_LOOP_DELAY_P99, 'P99 delay of the event loop'),
51
+ };
52
+
53
+ this.eventLoopUilization = meter.createObservableGauge(Metrics.NODEJS_EVENT_LOOP_UTILIZATION, {
54
+ valueType: ValueType.DOUBLE,
55
+ description: 'How busy is the event loop',
56
+ });
57
+
58
+ this.eventLoopTime = meter.createUpDownCounter(Metrics.NODEJS_EVENT_LOOP_TIME, {
59
+ unit: 'ms',
60
+ valueType: ValueType.INT,
61
+ description: 'How much time the event loop has spent in a given state',
62
+ });
63
+
64
+ this.eventLoopDelay = monitorEventLoopDelay();
65
+ }
66
+
67
+ start(): void {
68
+ if (this.started) {
69
+ return;
70
+ }
71
+
72
+ this.lastELU = performance.eventLoopUtilization();
73
+ this.eventLoopDelay.enable();
74
+ this.meter.addBatchObservableCallback(this.measure, [
75
+ this.eventLoopUilization,
76
+ ...Object.values(this.eventLoopDelayGauges),
77
+ ]);
78
+ }
79
+
80
+ stop(): void {
81
+ if (!this.started) {
82
+ return;
83
+ }
84
+ this.meter.removeBatchObservableCallback(this.measure, [
85
+ this.eventLoopUilization,
86
+ ...Object.values(this.eventLoopDelayGauges),
87
+ ]);
88
+ this.eventLoopDelay.disable();
89
+ this.eventLoopDelay.reset();
90
+ this.lastELU = undefined;
91
+ }
92
+
93
+ private measure = (obs: BatchObservableResult): void => {
94
+ const newELU = performance.eventLoopUtilization();
95
+ const delta = performance.eventLoopUtilization(newELU, this.lastELU);
96
+ this.lastELU = newELU;
97
+
98
+ // `utilization` [0,1] represents how much the event loop is busy vs waiting for new events to come in
99
+ // This should be corelated with CPU usage to gauge the performance characteristics of services
100
+ // 100% utilization leads to high latency because the event loop is _always_ busy, there's no breathing room for events to be processed quickly.
101
+ // Docs and examples:
102
+ // - https://nodesource.com/blog/event-loop-utilization-nodejs
103
+ // - https://youtu.be/WetXnEPraYM
104
+ obs.observe(this.eventLoopUilization, delta.utilization);
105
+
106
+ this.eventLoopTime.add(Math.floor(delta.idle), { [Attributes.NODEJS_EVENT_LOOP_STATE]: 'idle' });
107
+ this.eventLoopTime.add(Math.floor(delta.active), { [Attributes.NODEJS_EVENT_LOOP_STATE]: 'active' });
108
+
109
+ obs.observe(this.eventLoopDelayGauges.min, Math.floor(this.eventLoopDelay.min));
110
+ obs.observe(this.eventLoopDelayGauges.mean, Math.floor(this.eventLoopDelay.mean));
111
+ obs.observe(this.eventLoopDelayGauges.max, Math.floor(this.eventLoopDelay.max));
112
+ obs.observe(this.eventLoopDelayGauges.stddev, Math.floor(this.eventLoopDelay.stddev));
113
+ obs.observe(this.eventLoopDelayGauges.p50, Math.floor(this.eventLoopDelay.percentile(50)));
114
+ obs.observe(this.eventLoopDelayGauges.p90, Math.floor(this.eventLoopDelay.percentile(90)));
115
+ obs.observe(this.eventLoopDelayGauges.p99, Math.floor(this.eventLoopDelay.percentile(99)));
116
+
117
+ this.eventLoopDelay.reset();
118
+ };
119
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Creates a set of buckets that follow linear growth
3
+ * @param start - The start of the range
4
+ * @param end - The end of the range
5
+ * @param count - The number of buckets
6
+ * @returns - An array of bucket boundaries
7
+ */
8
+ export function linearBuckets(start: number, end: number, count: number): number[] {
9
+ const buckets: number[] = [];
10
+ const step = (end - start) / count;
11
+ for (let i = 0; i <= count; i++) {
12
+ buckets.push(Math.floor(start + i * step));
13
+ }
14
+ return buckets;
15
+ }
16
+
17
+ /**
18
+ * Creates an array of exponential buckets that follow the formulas at
19
+ * https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponential-buckets
20
+ *
21
+ * The formula followed is: bucket[i] = base ** i, where base = 2 ** (2 ** -scale). Naturally base will be very small when scale > 0.
22
+ * This ensures that between each power of 2, there are 2 ** scale intermediate buckets.
23
+ *
24
+ * @example
25
+ * scale = 2, count = 8
26
+ * base = 2 ** (2 ** -2) = 1.189207115
27
+ * |bucket index| value |
28
+ * |------------|-------|
29
+ * | 0 | 1 |
30
+ * | 1 | 1.18 |
31
+ * | 2 | 1.41 |
32
+ * | 3 | 1.68 |
33
+ * | 4 | 2 |
34
+ * | 5 | 2.37 |
35
+ * | 6 | 2.82 |
36
+ * | 7 | 3.36 |
37
+ * | 8 | 4 |
38
+ *
39
+ * @param scale - The "precision" of the buckets. The higher the scale, the more buckets will be created
40
+ * @param count - The total number of buckets
41
+ * @returns - An array of bucket boundaries
42
+ */
43
+ export function exponentialBuckets(scale: number, count: number): number[] {
44
+ const buckets: number[] = [];
45
+ const base = 2 ** (2 ** -scale);
46
+ for (let i = 0; i <= count; i++) {
47
+ buckets.push(base ** i);
48
+ }
49
+ return buckets;
50
+ }
package/src/index.ts ADDED
@@ -0,0 +1,10 @@
1
+ export * from './telemetry.js';
2
+ export * as Metrics from './metrics.js';
3
+ export * as Attributes from './attributes.js';
4
+ export * from './histogram_utils.js';
5
+ export * from './with_tracer.js';
6
+ export * from './prom_otel_adapter.js';
7
+ export * from './lmdb_metrics.js';
8
+ export * from './wrappers/index.js';
9
+ export * from './start.js';
10
+ export * from './otel_propagation.js';
@@ -0,0 +1,45 @@
1
+ import * as Metrics from './metrics.js';
2
+ import {
3
+ type AttributesType,
4
+ type BatchObservableResult,
5
+ type Meter,
6
+ type ObservableGauge,
7
+ ValueType,
8
+ } from './telemetry.js';
9
+
10
+ export type LmdbStatsCallback = () => Promise<{ mappingSize: number; numItems: number; actualSize: number }>;
11
+
12
+ export class LmdbMetrics {
13
+ private dbMapSize: ObservableGauge;
14
+ private dbUsedSize: ObservableGauge;
15
+ private dbNumItems: ObservableGauge;
16
+
17
+ constructor(meter: Meter, private attributes?: AttributesType, private getStats?: LmdbStatsCallback) {
18
+ this.dbMapSize = meter.createObservableGauge(Metrics.DB_MAP_SIZE, {
19
+ description: 'LMDB Map Size',
20
+ valueType: ValueType.INT,
21
+ unit: 'By',
22
+ });
23
+ this.dbUsedSize = meter.createObservableGauge(Metrics.DB_USED_SIZE, {
24
+ description: 'LMDB Used Size',
25
+ valueType: ValueType.INT,
26
+ unit: 'By',
27
+ });
28
+ this.dbNumItems = meter.createObservableGauge(Metrics.DB_NUM_ITEMS, {
29
+ description: 'LMDB Num Items',
30
+ valueType: ValueType.INT,
31
+ });
32
+
33
+ meter.addBatchObservableCallback(this.recordDBMetrics, [this.dbMapSize, this.dbUsedSize, this.dbNumItems]);
34
+ }
35
+
36
+ private recordDBMetrics = async (observable: BatchObservableResult) => {
37
+ if (!this.getStats) {
38
+ return;
39
+ }
40
+ const metrics = await this.getStats();
41
+ observable.observe(this.dbMapSize, metrics.mappingSize, this.attributes);
42
+ observable.observe(this.dbNumItems, metrics.numItems, this.attributes);
43
+ observable.observe(this.dbUsedSize, metrics.actualSize, this.attributes);
44
+ };
45
+ }
package/src/metrics.ts ADDED
@@ -0,0 +1,151 @@
1
+ /**
2
+ * @file Metric names used in Aztec.
3
+ * Metric names must be unique and not clash with {@link attributes.ts | Attribute names}.
4
+ * Prefix metric names with `aztec` and use dots `.` to separate namespaces.
5
+ *
6
+ * @see {@link https://opentelemetry.io/docs/specs/semconv/general/metrics/ | OpenTelemetry Metrics} for naming conventions.
7
+ */
8
+
9
+ export const BLOB_SINK_OBJECTS_IN_BLOB_STORE = 'aztec.blob_sink.objects_in_blob_store';
10
+ export const BLOB_SINK_BLOB_SIZE = 'aztec.blob_sink.blob_size';
11
+
12
+ /** How long it takes to simulate a circuit */
13
+ export const CIRCUIT_SIMULATION_DURATION = 'aztec.circuit.simulation.duration';
14
+ export const CIRCUIT_SIMULATION_INPUT_SIZE = 'aztec.circuit.simulation.input_size';
15
+ export const CIRCUIT_SIMULATION_OUTPUT_SIZE = 'aztec.circuit.simulation.output_size';
16
+
17
+ export const CIRCUIT_WITNESS_GEN_DURATION = 'aztec.circuit.witness_generation.duration';
18
+ export const CIRCUIT_WITNESS_GEN_INPUT_SIZE = 'aztec.circuit.witness_generation.input_size';
19
+ export const CIRCUIT_WITNESS_GEN_OUTPUT_SIZE = 'aztec.circuit.witness_generation.output_size';
20
+
21
+ export const CIRCUIT_PROVING_DURATION = 'aztec.circuit.proving.duration';
22
+ export const CIRCUIT_PROVING_INPUT_SIZE = 'aztec.circuit.proving.input_size';
23
+ export const CIRCUIT_PROVING_PROOF_SIZE = 'aztec.circuit.proving.proof_size';
24
+
25
+ export const CIRCUIT_PUBLIC_INPUTS_COUNT = 'aztec.circuit.public_inputs_count';
26
+ export const CIRCUIT_GATE_COUNT = 'aztec.circuit.gate_count';
27
+ export const CIRCUIT_SIZE = 'aztec.circuit.size';
28
+
29
+ export const MEMPOOL_TX_COUNT = 'aztec.mempool.tx_count';
30
+ export const MEMPOOL_TX_SIZE = 'aztec.mempool.tx_size';
31
+ export const DB_NUM_ITEMS = 'aztec.db.num_items';
32
+ export const DB_MAP_SIZE = 'aztec.db.map_size';
33
+ export const DB_USED_SIZE = 'aztec.db.used_size';
34
+
35
+ export const MEMPOOL_ATTESTATIONS_COUNT = 'aztec.mempool.attestations_count';
36
+ export const MEMPOOL_ATTESTATIONS_SIZE = 'aztec.mempool.attestations_size';
37
+
38
+ export const MEMPOOL_PROVER_QUOTE_COUNT = 'aztec.mempool.prover_quote_count';
39
+ export const MEMPOOL_PROVER_QUOTE_SIZE = 'aztec.mempool.prover_quote_size';
40
+
41
+ export const ARCHIVER_SYNC_DURATION = 'aztec.archiver.sync_duration';
42
+ export const ARCHIVER_L1_BLOCKS_SYNCED = 'aztec.archiver.l1_blocks_synced';
43
+ export const ARCHIVER_BLOCK_HEIGHT = 'aztec.archiver.block_height';
44
+ export const ARCHIVER_TX_COUNT = 'aztec.archiver.tx_count';
45
+ export const ARCHIVER_ROLLUP_PROOF_DELAY = 'aztec.archiver.rollup_proof_delay';
46
+ export const ARCHIVER_ROLLUP_PROOF_COUNT = 'aztec.archiver.rollup_proof_count';
47
+ export const ARCHIVER_PRUNE_COUNT = 'aztec.archiver.prune_count';
48
+
49
+ export const NODE_RECEIVE_TX_DURATION = 'aztec.node.receive_tx.duration';
50
+ export const NODE_RECEIVE_TX_COUNT = 'aztec.node.receive_tx.count';
51
+
52
+ export const SEQUENCER_STATE_TRANSITION_BUFFER_DURATION = 'aztec.sequencer.state_transition_buffer.duration';
53
+ export const SEQUENCER_BLOCK_BUILD_DURATION = 'aztec.sequencer.block.build_duration';
54
+ export const SEQUENCER_BLOCK_BUILD_MANA_PER_SECOND = 'aztec.sequencer.block.build_mana_per_second';
55
+ export const SEQUENCER_BLOCK_COUNT = 'aztec.sequencer.block.count';
56
+ export const SEQUENCER_CURRENT_STATE = 'aztec.sequencer.current.state';
57
+ export const SEQUENCER_CURRENT_BLOCK_NUMBER = 'aztec.sequencer.current.block_number';
58
+ export const SEQUENCER_CURRENT_BLOCK_SIZE = 'aztec.sequencer.current.block_size';
59
+ export const SEQUENCER_TIME_TO_COLLECT_ATTESTATIONS = 'aztec.sequencer.time_to_collect_attestations';
60
+ export const SEQUENCER_BLOCK_BUILD_INSERTION_TIME = 'aztec.sequencer.block_builder_tree_insertion_duration';
61
+
62
+ export const L1_PUBLISHER_GAS_PRICE = 'aztec.l1_publisher.gas_price';
63
+ export const L1_PUBLISHER_TX_COUNT = 'aztec.l1_publisher.tx_count';
64
+ export const L1_PUBLISHER_TX_DURATION = 'aztec.l1_publisher.tx_duration';
65
+ export const L1_PUBLISHER_TX_GAS = 'aztec.l1_publisher.tx_gas';
66
+ export const L1_PUBLISHER_TX_CALLDATA_SIZE = 'aztec.l1_publisher.tx_calldata_size';
67
+ export const L1_PUBLISHER_TX_CALLDATA_GAS = 'aztec.l1_publisher.tx_calldata_gas';
68
+ export const L1_PUBLISHER_TX_BLOBDATA_GAS_USED = 'aztec.l1_publisher.tx_blobdata_gas_used';
69
+ export const L1_PUBLISHER_TX_BLOBDATA_GAS_COST = 'aztec.l1_publisher.tx_blobdata_gas_cost';
70
+ export const L1_PUBLISHER_BLOB_COUNT = 'aztec.l1_publisher.blob_count';
71
+ export const L1_PUBLISHER_BLOB_INCLUSION_BLOCKS = 'aztec.l1_publisher.blob_inclusion_blocks';
72
+ export const L1_PUBLISHER_BLOB_TX_SUCCESS = 'aztec.l1_publisher.blob_tx_success';
73
+ export const L1_PUBLISHER_BLOB_TX_FAILURE = 'aztec.l1_publisher.blob_tx_failure';
74
+
75
+ export const PEER_MANAGER_GOODBYES_SENT = 'aztec.peer_manager.goodbyes_sent';
76
+ export const PEER_MANAGER_GOODBYES_RECEIVED = 'aztec.peer_manager.goodbyes_received';
77
+
78
+ export const P2P_REQ_RESP_SENT_REQUESTS = 'aztec.p2p.req_resp.sent_requests';
79
+ export const P2P_REQ_RESP_RECEIVED_REQUESTS = 'aztec.p2p.req_resp.received_requests';
80
+ export const P2P_REQ_RESP_FAILED_OUTBOUND_REQUESTS = 'aztec.p2p.req_resp.failed_outbound_requests';
81
+ export const P2P_REQ_RESP_FAILED_INBOUND_REQUESTS = 'aztec.p2p.req_resp.failed_inbound_requests';
82
+
83
+ export const PUBLIC_PROCESSOR_TX_DURATION = 'aztec.public_processor.tx_duration';
84
+ export const PUBLIC_PROCESSOR_TX_COUNT = 'aztec.public_processor.tx_count';
85
+ export const PUBLIC_PROCESSOR_TX_PHASE_COUNT = 'aztec.public_processor.tx_phase_count';
86
+ export const PUBLIC_PROCESSOR_TX_GAS = 'aztec.public_processor.tx_gas';
87
+ export const PUBLIC_PROCESSOR_PHASE_DURATION = 'aztec.public_processor.phase_duration';
88
+ export const PUBLIC_PROCESSOR_PHASE_COUNT = 'aztec.public_processor.phase_count';
89
+ export const PUBLIC_PROCESSOR_DEPLOY_BYTECODE_SIZE = 'aztec.public_processor.deploy_bytecode_size';
90
+ export const PUBLIC_PROCESSOR_TOTAL_GAS = 'aztec.public_processor.total_gas';
91
+ export const PUBLIC_PROCESSOR_TOTAL_GAS_HISTOGRAM = 'aztec.public_processor.total_gas_histogram';
92
+ export const PUBLIC_PROCESSOR_GAS_RATE = 'aztec.public_processor.gas_rate';
93
+ export const PUBLIC_PROCESSOR_TREE_INSERTION = 'aztec.public_processor.tree_insertion';
94
+
95
+ export const PUBLIC_EXECUTOR_SIMULATION_COUNT = 'aztec.public_executor.simulation_count';
96
+ export const PUBLIC_EXECUTOR_SIMULATION_DURATION = 'aztec.public_executor.simulation_duration';
97
+ export const PUBLIC_EXECUTOR_SIMULATION_MANA_PER_SECOND = 'aztec.public_executor.simulation_mana_per_second';
98
+ export const PUBLIC_EXECUTION_SIMULATION_BYTECODE_SIZE = 'aztec.public_executor.simulation_bytecode_size';
99
+ export const PUBLIC_EXECUTION_PRIVATE_EFFECTS_INSERTION = 'aztec.public_executor.private_effects_insertion';
100
+
101
+ export const PROVING_ORCHESTRATOR_BASE_ROLLUP_INPUTS_DURATION =
102
+ 'aztec.proving_orchestrator.base_rollup.inputs_duration';
103
+
104
+ export const PROVING_QUEUE_JOB_SIZE = 'aztec.proving_queue.job_size';
105
+ export const PROVING_QUEUE_SIZE = 'aztec.proving_queue.size';
106
+ export const PROVING_QUEUE_ACTIVE_JOBS = 'aztec.proving_queue.active_jobs';
107
+ export const PROVING_QUEUE_RESOLVED_JOBS = 'aztec.proving_queue.resolved_jobs';
108
+ export const PROVING_QUEUE_REJECTED_JOBS = 'aztec.proving_queue.rejected_jobs';
109
+ export const PROVING_QUEUE_RETRIED_JOBS = 'aztec.proving_queue.retried_jobs';
110
+ export const PROVING_QUEUE_TIMED_OUT_JOBS = 'aztec.proving_queue.timed_out_jobs';
111
+ export const PROVING_QUEUE_JOB_WAIT = 'aztec.proving_queue.job_wait';
112
+ export const PROVING_QUEUE_JOB_DURATION = 'aztec.proving_queue.job_duration';
113
+ export const PROVING_QUEUE_DB_NUM_ITEMS = 'aztec.proving_queue.db.num_items';
114
+ export const PROVING_QUEUE_DB_MAP_SIZE = 'aztec.proving_queue.db.map_size';
115
+ export const PROVING_QUEUE_DB_USED_SIZE = 'aztec.proving_queue.db.used_size';
116
+
117
+ export const PROVING_AGENT_IDLE = 'aztec.proving_queue.agent.idle';
118
+
119
+ export const PROVER_NODE_EXECUTION_DURATION = 'aztec.prover_node.execution.duration';
120
+ export const PROVER_NODE_JOB_DURATION = 'aztec.prover_node.job_duration';
121
+ export const PROVER_NODE_JOB_BLOCKS = 'aztec.prover_node.job_blocks';
122
+ export const PROVER_NODE_JOB_TRANSACTIONS = 'aztec.prover_node.job_transactions';
123
+
124
+ export const WORLD_STATE_FORK_DURATION = 'aztec.world_state.fork.duration';
125
+ export const WORLD_STATE_SYNC_DURATION = 'aztec.world_state.sync.duration';
126
+ export const WORLD_STATE_MERKLE_TREE_SIZE = 'aztec.world_state.merkle_tree_size';
127
+ export const WORLD_STATE_DB_SIZE = 'aztec.world_state.db_size';
128
+ export const WORLD_STATE_DB_MAP_SIZE = 'aztec.world_state.db_map_size';
129
+ export const WORLD_STATE_TREE_SIZE = 'aztec.world_state.tree_size';
130
+ export const WORLD_STATE_UNFINALISED_HEIGHT = 'aztec.world_state.unfinalised_height';
131
+ export const WORLD_STATE_FINALISED_HEIGHT = 'aztec.world_state.finalised_height';
132
+ export const WORLD_STATE_OLDEST_BLOCK = 'aztec.world_state.oldest_block';
133
+ export const WORLD_STATE_DB_USED_SIZE = 'aztec.world_state.db_used_size';
134
+ export const WORLD_STATE_DB_NUM_ITEMS = 'aztec.world_state.db_num_items';
135
+ export const WORLD_STATE_REQUEST_TIME = 'aztec.world_state.request_time';
136
+
137
+ export const PROOF_VERIFIER_COUNT = 'aztec.proof_verifier.count';
138
+
139
+ export const VALIDATOR_RE_EXECUTION_TIME = 'aztec.validator.re_execution_time';
140
+ export const VALIDATOR_FAILED_REEXECUTION_COUNT = 'aztec.validator.failed_reexecution_count';
141
+
142
+ export const NODEJS_EVENT_LOOP_DELAY_MIN = 'nodejs.eventloop.delay.min';
143
+ export const NODEJS_EVENT_LOOP_DELAY_MEAN = 'nodejs.eventloop.delay.mean';
144
+ export const NODEJS_EVENT_LOOP_DELAY_MAX = 'nodejs.eventloop.delay.max';
145
+ export const NODEJS_EVENT_LOOP_DELAY_STDDEV = 'nodejs.eventloop.delay.stddev';
146
+ export const NODEJS_EVENT_LOOP_DELAY_P50 = 'nodejs.eventloop.delay.p50';
147
+ export const NODEJS_EVENT_LOOP_DELAY_P90 = 'nodejs.eventloop.delay.p90';
148
+ export const NODEJS_EVENT_LOOP_DELAY_P99 = 'nodejs.eventloop.delay.p99';
149
+
150
+ export const NODEJS_EVENT_LOOP_UTILIZATION = 'nodejs.eventloop.utilization';
151
+ export const NODEJS_EVENT_LOOP_TIME = 'nodejs.eventloop.time';