@aztec/telemetry-client 0.77.0-testnet-ignition.26 → 0.77.0-testnet-ignition.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/dest/attributes.d.ts +0 -99
- package/dest/attributes.d.ts.map +0 -1
- package/dest/bench.d.ts +0 -29
- package/dest/bench.d.ts.map +0 -1
- package/dest/config.d.ts +0 -12
- package/dest/config.d.ts.map +0 -1
- package/dest/event_loop_monitor.d.ts +0 -18
- package/dest/event_loop_monitor.d.ts.map +0 -1
- package/dest/index.d.ts +0 -10
- package/dest/index.d.ts.map +0 -1
- package/dest/lmdb_metrics.d.ts +0 -16
- package/dest/lmdb_metrics.d.ts.map +0 -1
- package/dest/metrics.d.ts +0 -129
- package/dest/metrics.d.ts.map +0 -1
- package/dest/noop.d.ts +0 -14
- package/dest/noop.d.ts.map +0 -1
- package/dest/otel.d.ts +0 -32
- package/dest/otel.d.ts.map +0 -1
- package/dest/otel_filter_metric_exporter.d.ts +0 -12
- package/dest/otel_filter_metric_exporter.d.ts.map +0 -1
- package/dest/otel_logger_provider.d.ts +0 -4
- package/dest/otel_logger_provider.d.ts.map +0 -1
- package/dest/otel_propagation.d.ts +0 -3
- package/dest/otel_propagation.d.ts.map +0 -1
- package/dest/otel_resource.d.ts +0 -3
- package/dest/otel_resource.d.ts.map +0 -1
- package/dest/prom_otel_adapter.d.ts +0 -127
- package/dest/prom_otel_adapter.d.ts.map +0 -1
- package/dest/start.d.ts +0 -6
- package/dest/start.d.ts.map +0 -1
- package/dest/telemetry.d.ts +0 -118
- package/dest/telemetry.d.ts.map +0 -1
- package/dest/vendor/attributes.d.ts +0 -5
- package/dest/vendor/attributes.d.ts.map +0 -1
- package/dest/vendor/otel-pino-stream.d.ts +0 -41
- package/dest/vendor/otel-pino-stream.d.ts.map +0 -1
- package/dest/with_tracer.d.ts +0 -33
- package/dest/with_tracer.d.ts.map +0 -1
- package/dest/wrappers/fetch.d.ts +0 -16
- package/dest/wrappers/fetch.d.ts.map +0 -1
- package/dest/wrappers/index.d.ts +0 -4
- package/dest/wrappers/index.d.ts.map +0 -1
- package/dest/wrappers/json_rpc_server.d.ts +0 -4
- package/dest/wrappers/json_rpc_server.d.ts.map +0 -1
- package/dest/wrappers/l2_block_stream.d.ts +0 -15
- package/dest/wrappers/l2_block_stream.d.ts.map +0 -1
package/package.json
CHANGED
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"!*.test.*"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aztec/foundation": "0.77.0-testnet-ignition.
|
|
30
|
-
"@aztec/stdlib": "0.77.0-testnet-ignition.
|
|
29
|
+
"@aztec/foundation": "0.77.0-testnet-ignition.27",
|
|
30
|
+
"@aztec/stdlib": "0.77.0-testnet-ignition.27",
|
|
31
31
|
"@opentelemetry/api": "^1.9.0",
|
|
32
32
|
"@opentelemetry/api-logs": "^0.55.0",
|
|
33
33
|
"@opentelemetry/core": "^1.28.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"../../foundation/src/jest/setup.mjs"
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
|
-
"version": "0.77.0-testnet-ignition.
|
|
88
|
+
"version": "0.77.0-testnet-ignition.27"
|
|
89
89
|
}
|
package/dest/attributes.d.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @overview This file contains the custom attributes used in telemetry events.
|
|
3
|
-
* Attribute names exist in a global namespace, alongside metric names. Use this file to ensure that attribute names are unique.
|
|
4
|
-
*
|
|
5
|
-
* To define a new attribute follow these steps:
|
|
6
|
-
* 1. Make sure it's not a semantic attribute that's already been defined by {@link @opentelemetry/semantic-conventions | OpenTelemetry} (e.g. `service.name`)
|
|
7
|
-
* 2. Come up with a unique name for it so that it doesn't clash with other attributes or metrics.
|
|
8
|
-
* 3. Prefix the attribute name with `aztec` to make it clear that it's a custom attribute.
|
|
9
|
-
* 4. Add a description of what the attribute represents and examples of what it might contain.
|
|
10
|
-
* 5. Start using it.
|
|
11
|
-
*
|
|
12
|
-
* @note Attributes and metric names exist in a hierarchy of namespaces. If a name has been used as a namespace, then it can not be used as a name for an attribute or metric.
|
|
13
|
-
* @example If `aztec.circuit.name` has been defined as an attribute then `aztec.circuit` alone can not be re-used for a metric or attribute because it is already a namespace.
|
|
14
|
-
* @see {@link https://opentelemetry.io/docs/specs/semconv/general/attribute-naming/}
|
|
15
|
-
*/
|
|
16
|
-
/** The Aztec network identifier */
|
|
17
|
-
export declare const NETWORK_NAME = "aztec.network_name";
|
|
18
|
-
/**
|
|
19
|
-
* The name of the protocol circuit being run (e.g. public-kernel-setup or base-rollup)
|
|
20
|
-
* @see {@link @aztec/stdlib/stats:CircuitName}
|
|
21
|
-
*/
|
|
22
|
-
export declare const PROTOCOL_CIRCUIT_NAME = "aztec.circuit.protocol_circuit_name";
|
|
23
|
-
/**
|
|
24
|
-
* The type of protocol circuit being run: server or client
|
|
25
|
-
*/
|
|
26
|
-
export declare const PROTOCOL_CIRCUIT_TYPE = "aztec.circuit.protocol_circuit_type";
|
|
27
|
-
/**
|
|
28
|
-
* For an app circuit, the contract:function being run (e.g. Token:transfer)
|
|
29
|
-
*/
|
|
30
|
-
export declare const APP_CIRCUIT_NAME = "aztec.circuit.app_circuit_name";
|
|
31
|
-
/**
|
|
32
|
-
* The type of app circuit being run: server or client
|
|
33
|
-
*/
|
|
34
|
-
export declare const APP_CIRCUIT_TYPE = "aztec.circuit.app_circuit_type";
|
|
35
|
-
/** The block archive */
|
|
36
|
-
export declare const BLOCK_ARCHIVE = "aztec.block.archive";
|
|
37
|
-
/** The block number */
|
|
38
|
-
export declare const BLOCK_NUMBER = "aztec.block.number";
|
|
39
|
-
/** The slot number */
|
|
40
|
-
export declare const SLOT_NUMBER = "aztec.slot.number";
|
|
41
|
-
/** The parent's block number */
|
|
42
|
-
export declare const BLOCK_PARENT = "aztec.block.parent";
|
|
43
|
-
/** How many txs are being processed to build this block */
|
|
44
|
-
export declare const BLOCK_CANDIDATE_TXS_COUNT = "aztec.block.candidate_txs_count";
|
|
45
|
-
/** How many actual txs were included in this block */
|
|
46
|
-
export declare const BLOCK_TXS_COUNT = "aztec.block.txs_count";
|
|
47
|
-
/** The block size */
|
|
48
|
-
export declare const BLOCK_SIZE = "aztec.block.size";
|
|
49
|
-
/** How many blocks are included in this epoch */
|
|
50
|
-
export declare const EPOCH_SIZE = "aztec.epoch.size";
|
|
51
|
-
/** The proposer of a block */
|
|
52
|
-
export declare const BLOCK_PROPOSER = "aztec.block.proposer";
|
|
53
|
-
/** The epoch number */
|
|
54
|
-
export declare const EPOCH_NUMBER = "aztec.epoch.number";
|
|
55
|
-
/** The tx hash */
|
|
56
|
-
export declare const TX_HASH = "aztec.tx.hash";
|
|
57
|
-
/** Generic attribute representing whether the action was successful or not */
|
|
58
|
-
export declare const OK = "aztec.ok";
|
|
59
|
-
/** Generic status attribute */
|
|
60
|
-
export declare const STATUS = "aztec.status";
|
|
61
|
-
/** Generic error type attribute */
|
|
62
|
-
export declare const ERROR_TYPE = "aztec.error_type";
|
|
63
|
-
/** The type of the transaction */
|
|
64
|
-
export declare const L1_TX_TYPE = "aztec.l1.tx_type";
|
|
65
|
-
/** The L1 address of the entity that sent a transaction to L1 */
|
|
66
|
-
export declare const L1_SENDER = "aztec.l1.sender";
|
|
67
|
-
/** The phase of the transaction */
|
|
68
|
-
export declare const TX_PHASE_NAME = "aztec.tx.phase_name";
|
|
69
|
-
/** The reason for disconnecting a peer */
|
|
70
|
-
export declare const P2P_GOODBYE_REASON = "aztec.p2p.goodbye.reason";
|
|
71
|
-
/** The proving job type */
|
|
72
|
-
export declare const PROVING_JOB_TYPE = "aztec.proving.job_type";
|
|
73
|
-
/** The proving job id */
|
|
74
|
-
export declare const PROVING_JOB_ID = "aztec.proving.job_id";
|
|
75
|
-
export declare const MERKLE_TREE_NAME = "aztec.merkle_tree.name";
|
|
76
|
-
/** The prover-id in a root rollup proof. */
|
|
77
|
-
export declare const ROLLUP_PROVER_ID = "aztec.rollup.prover_id";
|
|
78
|
-
/** Whether the proof submission was timed out (delayed more than 20 min) */
|
|
79
|
-
export declare const PROOF_TIMED_OUT = "aztec.proof.timed_out";
|
|
80
|
-
export declare const P2P_ID = "aztec.p2p.id";
|
|
81
|
-
export declare const P2P_REQ_RESP_PROTOCOL = "aztec.p2p.req_resp.protocol";
|
|
82
|
-
export declare const P2P_REQ_RESP_BATCH_REQUESTS_COUNT = "aztec.p2p.req_resp.batch_requests_count";
|
|
83
|
-
export declare const POOL_NAME = "aztec.pool.name";
|
|
84
|
-
export declare const SEQUENCER_STATE = "aztec.sequencer.state";
|
|
85
|
-
export declare const SIMULATOR_PHASE = "aztec.simulator.phase";
|
|
86
|
-
export declare const TARGET_ADDRESS = "aztec.address.target";
|
|
87
|
-
export declare const SENDER_ADDRESS = "aztec.address.sender";
|
|
88
|
-
export declare const MANA_USED = "aztec.mana.used";
|
|
89
|
-
/** Whether a sync process is the initial run, which is usually slower than iterative ones. */
|
|
90
|
-
export declare const INITIAL_SYNC = "aztec.initial_sync";
|
|
91
|
-
/** Identifier for the tables in a world state DB */
|
|
92
|
-
export declare const WS_DB_DATA_TYPE = "aztec.world_state.db_type";
|
|
93
|
-
/** Identifier for component database (e.g. archiver, tx pool) */
|
|
94
|
-
export declare const DB_DATA_TYPE = "aztec.db_type";
|
|
95
|
-
export declare const REVERTIBILITY = "aztec.revertibility";
|
|
96
|
-
export declare const GAS_DIMENSION = "aztec.gas_dimension";
|
|
97
|
-
export declare const WORLD_STATE_REQUEST_TYPE = "aztec.world_state_request";
|
|
98
|
-
export declare const NODEJS_EVENT_LOOP_STATE = "nodejs.eventloop.state";
|
|
99
|
-
//# sourceMappingURL=attributes.d.ts.map
|
package/dest/attributes.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../src/attributes.ts"],"names":[],"mappings":"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1C,eAAO,MAAM,kBAAkB,6BAA6B,CAAC;AAC7D,2BAA2B;AAC3B,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,yBAAyB;AACzB,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAErD,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,4CAA4C;AAC5C,eAAO,MAAM,gBAAgB,2BAA2B,CAAC;AACzD,4EAA4E;AAC5E,eAAO,MAAM,eAAe,0BAA0B,CAAC;AAEvD,eAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,eAAO,MAAM,qBAAqB,gCAAgC,CAAC;AACnE,eAAO,MAAM,iCAAiC,4CAA4C,CAAC;AAC3F,eAAO,MAAM,SAAS,oBAAoB,CAAC;AAE3C,eAAO,MAAM,eAAe,0BAA0B,CAAC;AAEvD,eAAO,MAAM,eAAe,0BAA0B,CAAC;AACvD,eAAO,MAAM,cAAc,yBAAyB,CAAC;AACrD,eAAO,MAAM,cAAc,yBAAyB,CAAC;AACrD,eAAO,MAAM,SAAS,oBAAoB,CAAC;AAE3C,8FAA8F;AAC9F,eAAO,MAAM,YAAY,uBAAuB,CAAC;AAEjD,oDAAoD;AACpD,eAAO,MAAM,eAAe,8BAA8B,CAAC;AAE3D,iEAAiE;AACjE,eAAO,MAAM,YAAY,kBAAkB,CAAC;AAE5C,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,eAAO,MAAM,aAAa,wBAAwB,CAAC;AAEnD,eAAO,MAAM,wBAAwB,8BAA8B,CAAC;AAEpE,eAAO,MAAM,uBAAuB,2BAA2B,CAAC"}
|
package/dest/bench.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Context, ValueType } from '@opentelemetry/api';
|
|
2
|
-
import type { AttributesType, Meter, TelemetryClient, Tracer } from './telemetry.js';
|
|
3
|
-
export type BenchmarkMetricsType = {
|
|
4
|
-
name: string;
|
|
5
|
-
metrics: {
|
|
6
|
-
name: string;
|
|
7
|
-
type: 'gauge' | 'counter' | 'histogram';
|
|
8
|
-
description?: string;
|
|
9
|
-
unit?: string;
|
|
10
|
-
valueType?: ValueType;
|
|
11
|
-
points: BenchmarkDataPoint[];
|
|
12
|
-
}[];
|
|
13
|
-
}[];
|
|
14
|
-
export declare class BenchmarkTelemetryClient implements TelemetryClient {
|
|
15
|
-
private meters;
|
|
16
|
-
getMeter(name: string): Meter;
|
|
17
|
-
getTracer(): Tracer;
|
|
18
|
-
stop(): Promise<void>;
|
|
19
|
-
flush(): Promise<void>;
|
|
20
|
-
isEnabled(): boolean;
|
|
21
|
-
getMeters(): BenchmarkMetricsType;
|
|
22
|
-
clear(): void;
|
|
23
|
-
}
|
|
24
|
-
export type BenchmarkDataPoint = {
|
|
25
|
-
value: number;
|
|
26
|
-
attributes?: AttributesType;
|
|
27
|
-
context?: Context;
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=bench.d.ts.map
|
package/dest/bench.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bench.d.ts","sourceRoot":"","sources":["../src/bench.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,OAAO,EAA6B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGjH,OAAO,KAAK,EACV,cAAc,EAGd,KAAK,EAIL,eAAe,EACf,MAAM,EAEP,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;QACxC,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,MAAM,EAAE,kBAAkB,EAAE,CAAC;KAC9B,EAAE,CAAC;CACL,EAAE,CAAC;AAEJ,qBAAa,wBAAyB,YAAW,eAAe;IAC9D,OAAO,CAAC,MAAM,CAA4B;IAE1C,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK;IAM7B,SAAS,IAAI,MAAM;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,SAAS;IAIT,SAAS,IAAI,oBAAoB;IAIjC,KAAK;CAGN;AAgDD,MAAM,MAAM,kBAAkB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,cAAc,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC"}
|
package/dest/config.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type ConfigMappingsType } from '@aztec/foundation/config';
|
|
2
|
-
export interface TelemetryClientConfig {
|
|
3
|
-
metricsCollectorUrl?: URL;
|
|
4
|
-
tracesCollectorUrl?: URL;
|
|
5
|
-
logsCollectorUrl?: URL;
|
|
6
|
-
otelCollectIntervalMs: number;
|
|
7
|
-
otelExportTimeoutMs: number;
|
|
8
|
-
otelExcludeMetrics?: string[];
|
|
9
|
-
}
|
|
10
|
-
export declare const telemetryClientConfigMappings: ConfigMappingsType<TelemetryClientConfig>;
|
|
11
|
-
export declare function getConfigEnvVars(): TelemetryClientConfig;
|
|
12
|
-
//# sourceMappingURL=config.d.ts.map
|
package/dest/config.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAAyB,MAAM,0BAA0B,CAAC;AAE1F,MAAM,WAAW,qBAAqB;IACpC,mBAAmB,CAAC,EAAE,GAAG,CAAC;IAC1B,kBAAkB,CAAC,EAAE,GAAG,CAAC;IACzB,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,eAAO,MAAM,6BAA6B,EAAE,kBAAkB,CAAC,qBAAqB,CAwCnF,CAAC;AAEF,wBAAgB,gBAAgB,IAAI,qBAAqB,CAExD"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type Meter } from './telemetry.js';
|
|
2
|
-
/**
|
|
3
|
-
* Detector for custom Aztec attributes
|
|
4
|
-
*/
|
|
5
|
-
export declare class EventLoopMonitor {
|
|
6
|
-
private meter;
|
|
7
|
-
private eventLoopDelayGauges;
|
|
8
|
-
private eventLoopUilization;
|
|
9
|
-
private eventLoopTime;
|
|
10
|
-
private started;
|
|
11
|
-
private lastELU;
|
|
12
|
-
private eventLoopDelay;
|
|
13
|
-
constructor(meter: Meter);
|
|
14
|
-
start(): void;
|
|
15
|
-
stop(): void;
|
|
16
|
-
private measure;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=event_loop_monitor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"event_loop_monitor.d.ts","sourceRoot":"","sources":["../src/event_loop_monitor.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,KAAK,EAIX,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,qBAAa,gBAAgB;IAmBf,OAAO,CAAC,KAAK;IAlBzB,OAAO,CAAC,oBAAoB,CAQ1B;IAEF,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;IAgChC,KAAK,IAAI,IAAI;IAab,IAAI,IAAI,IAAI;IAaZ,OAAO,CAAC,OAAO,CAyBb;CACH"}
|
package/dest/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './telemetry.js';
|
|
2
|
-
export * as Metrics from './metrics.js';
|
|
3
|
-
export * as Attributes from './attributes.js';
|
|
4
|
-
export * from './with_tracer.js';
|
|
5
|
-
export * from './prom_otel_adapter.js';
|
|
6
|
-
export * from './lmdb_metrics.js';
|
|
7
|
-
export * from './wrappers/index.js';
|
|
8
|
-
export * from './start.js';
|
|
9
|
-
export * from './otel_propagation.js';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dest/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,uBAAuB,CAAC"}
|
package/dest/lmdb_metrics.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type Meter } from './telemetry.js';
|
|
2
|
-
export type LmdbStatsCallback = () => Promise<{
|
|
3
|
-
mappingSize: number;
|
|
4
|
-
numItems: number;
|
|
5
|
-
actualSize: number;
|
|
6
|
-
}>;
|
|
7
|
-
export declare class LmdbMetrics {
|
|
8
|
-
private attributes?;
|
|
9
|
-
private getStats?;
|
|
10
|
-
private dbMapSize;
|
|
11
|
-
private dbUsedSize;
|
|
12
|
-
private dbNumItems;
|
|
13
|
-
constructor(meter: Meter, attributes?: Partial<Record<"aztec.network_name" | "aztec.circuit.protocol_circuit_name" | "aztec.circuit.protocol_circuit_type" | "aztec.circuit.app_circuit_name" | "aztec.circuit.app_circuit_type" | "aztec.block.archive" | "aztec.block.number" | "aztec.slot.number" | "aztec.block.parent" | "aztec.block.candidate_txs_count" | "aztec.block.txs_count" | "aztec.block.size" | "aztec.epoch.size" | "aztec.block.proposer" | "aztec.epoch.number" | "aztec.tx.hash" | "aztec.ok" | "aztec.status" | "aztec.error_type" | "aztec.l1.tx_type" | "aztec.l1.sender" | "aztec.tx.phase_name" | "aztec.p2p.goodbye.reason" | "aztec.proving.job_type" | "aztec.proving.job_id" | "aztec.merkle_tree.name" | "aztec.rollup.prover_id" | "aztec.proof.timed_out" | "aztec.p2p.id" | "aztec.p2p.req_resp.protocol" | "aztec.p2p.req_resp.batch_requests_count" | "aztec.pool.name" | "aztec.sequencer.state" | "aztec.simulator.phase" | "aztec.address.target" | "aztec.address.sender" | "aztec.mana.used" | "aztec.initial_sync" | "aztec.world_state.db_type" | "aztec.db_type" | "aztec.revertibility" | "aztec.gas_dimension" | "aztec.world_state_request" | "nodejs.eventloop.state", import("@opentelemetry/api").AttributeValue>> | undefined, getStats?: LmdbStatsCallback | undefined);
|
|
14
|
-
private recordDBMetrics;
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=lmdb_metrics.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lmdb_metrics.d.ts","sourceRoot":"","sources":["../src/lmdb_metrics.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,KAAK,EAGX,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7G,qBAAa,WAAW;IAKI,OAAO,CAAC,UAAU,CAAC;IAAkB,OAAO,CAAC,QAAQ,CAAC;IAJhF,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,UAAU,CAAkB;gBAExB,KAAK,EAAE,KAAK,EAAU,UAAU,CAAC,4qCAAgB,EAAU,QAAQ,CAAC,+BAAmB;IAmBnG,OAAO,CAAC,eAAe,CAQrB;CACH"}
|
package/dest/metrics.d.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
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
|
-
export declare const BLOB_SINK_OBJECTS_IN_BLOB_STORE = "aztec.blob_sink.objects_in_blob_store";
|
|
9
|
-
export declare const BLOB_SINK_BLOB_SIZE = "aztec.blob_sink.blob_size";
|
|
10
|
-
/** How long it takes to simulate a circuit */
|
|
11
|
-
export declare const CIRCUIT_SIMULATION_DURATION = "aztec.circuit.simulation.duration";
|
|
12
|
-
export declare const CIRCUIT_SIMULATION_INPUT_SIZE = "aztec.circuit.simulation.input_size";
|
|
13
|
-
export declare const CIRCUIT_SIMULATION_OUTPUT_SIZE = "aztec.circuit.simulation.output_size";
|
|
14
|
-
export declare const CIRCUIT_WITNESS_GEN_DURATION = "aztec.circuit.witness_generation.duration";
|
|
15
|
-
export declare const CIRCUIT_WITNESS_GEN_INPUT_SIZE = "aztec.circuit.witness_generation.input_size";
|
|
16
|
-
export declare const CIRCUIT_WITNESS_GEN_OUTPUT_SIZE = "aztec.circuit.witness_generation.output_size";
|
|
17
|
-
export declare const CIRCUIT_PROVING_DURATION = "aztec.circuit.proving.duration";
|
|
18
|
-
export declare const CIRCUIT_PROVING_INPUT_SIZE = "aztec.circuit.proving.input_size";
|
|
19
|
-
export declare const CIRCUIT_PROVING_PROOF_SIZE = "aztec.circuit.proving.proof_size";
|
|
20
|
-
export declare const CIRCUIT_PUBLIC_INPUTS_COUNT = "aztec.circuit.public_inputs_count";
|
|
21
|
-
export declare const CIRCUIT_GATE_COUNT = "aztec.circuit.gate_count";
|
|
22
|
-
export declare const CIRCUIT_SIZE = "aztec.circuit.size";
|
|
23
|
-
export declare const MEMPOOL_TX_COUNT = "aztec.mempool.tx_count";
|
|
24
|
-
export declare const MEMPOOL_TX_SIZE = "aztec.mempool.tx_size";
|
|
25
|
-
export declare const DB_NUM_ITEMS = "aztec.db.num_items";
|
|
26
|
-
export declare const DB_MAP_SIZE = "aztec.db.map_size";
|
|
27
|
-
export declare const DB_USED_SIZE = "aztec.db.used_size";
|
|
28
|
-
export declare const MEMPOOL_ATTESTATIONS_COUNT = "aztec.mempool.attestations_count";
|
|
29
|
-
export declare const MEMPOOL_ATTESTATIONS_SIZE = "aztec.mempool.attestations_size";
|
|
30
|
-
export declare const ARCHIVER_SYNC_DURATION = "aztec.archiver.sync_duration";
|
|
31
|
-
export declare const ARCHIVER_L1_BLOCKS_SYNCED = "aztec.archiver.l1_blocks_synced";
|
|
32
|
-
export declare const ARCHIVER_L1_BLOCK_HEIGHT = "aztec.archiver.l1_block_height";
|
|
33
|
-
export declare const ARCHIVER_BLOCK_HEIGHT = "aztec.archiver.block_height";
|
|
34
|
-
export declare const ARCHIVER_TX_COUNT = "aztec.archiver.tx_count";
|
|
35
|
-
export declare const ARCHIVER_ROLLUP_PROOF_DELAY = "aztec.archiver.rollup_proof_delay";
|
|
36
|
-
export declare const ARCHIVER_ROLLUP_PROOF_COUNT = "aztec.archiver.rollup_proof_count";
|
|
37
|
-
export declare const ARCHIVER_PRUNE_COUNT = "aztec.archiver.prune_count";
|
|
38
|
-
export declare const NODE_RECEIVE_TX_DURATION = "aztec.node.receive_tx.duration";
|
|
39
|
-
export declare const NODE_RECEIVE_TX_COUNT = "aztec.node.receive_tx.count";
|
|
40
|
-
export declare const SEQUENCER_STATE_TRANSITION_BUFFER_DURATION = "aztec.sequencer.state_transition_buffer.duration";
|
|
41
|
-
export declare const SEQUENCER_BLOCK_BUILD_DURATION = "aztec.sequencer.block.build_duration";
|
|
42
|
-
export declare const SEQUENCER_BLOCK_BUILD_MANA_PER_SECOND = "aztec.sequencer.block.build_mana_per_second";
|
|
43
|
-
export declare const SEQUENCER_BLOCK_COUNT = "aztec.sequencer.block.count";
|
|
44
|
-
export declare const SEQUENCER_CURRENT_STATE = "aztec.sequencer.current.state";
|
|
45
|
-
export declare const SEQUENCER_CURRENT_BLOCK_NUMBER = "aztec.sequencer.current.block_number";
|
|
46
|
-
export declare const SEQUENCER_CURRENT_BLOCK_SIZE = "aztec.sequencer.current.block_size";
|
|
47
|
-
export declare const SEQUENCER_TIME_TO_COLLECT_ATTESTATIONS = "aztec.sequencer.time_to_collect_attestations";
|
|
48
|
-
export declare const SEQUENCER_BLOCK_BUILD_INSERTION_TIME = "aztec.sequencer.block_builder_tree_insertion_duration";
|
|
49
|
-
export declare const L1_PUBLISHER_GAS_PRICE = "aztec.l1_publisher.gas_price";
|
|
50
|
-
export declare const L1_PUBLISHER_TX_COUNT = "aztec.l1_publisher.tx_count";
|
|
51
|
-
export declare const L1_PUBLISHER_TX_DURATION = "aztec.l1_publisher.tx_duration";
|
|
52
|
-
export declare const L1_PUBLISHER_TX_GAS = "aztec.l1_publisher.tx_gas";
|
|
53
|
-
export declare const L1_PUBLISHER_TX_CALLDATA_SIZE = "aztec.l1_publisher.tx_calldata_size";
|
|
54
|
-
export declare const L1_PUBLISHER_TX_CALLDATA_GAS = "aztec.l1_publisher.tx_calldata_gas";
|
|
55
|
-
export declare const L1_PUBLISHER_TX_BLOBDATA_GAS_USED = "aztec.l1_publisher.tx_blobdata_gas_used";
|
|
56
|
-
export declare const L1_PUBLISHER_TX_BLOBDATA_GAS_COST = "aztec.l1_publisher.tx_blobdata_gas_cost";
|
|
57
|
-
export declare const L1_PUBLISHER_BLOB_COUNT = "aztec.l1_publisher.blob_count";
|
|
58
|
-
export declare const L1_PUBLISHER_BLOB_INCLUSION_BLOCKS = "aztec.l1_publisher.blob_inclusion_blocks";
|
|
59
|
-
export declare const L1_PUBLISHER_BLOB_TX_SUCCESS = "aztec.l1_publisher.blob_tx_success";
|
|
60
|
-
export declare const L1_PUBLISHER_BLOB_TX_FAILURE = "aztec.l1_publisher.blob_tx_failure";
|
|
61
|
-
export declare const L1_PUBLISHER_BALANCE = "aztec.l1_publisher.balance";
|
|
62
|
-
export declare const PEER_MANAGER_GOODBYES_SENT = "aztec.peer_manager.goodbyes_sent";
|
|
63
|
-
export declare const PEER_MANAGER_GOODBYES_RECEIVED = "aztec.peer_manager.goodbyes_received";
|
|
64
|
-
export declare const P2P_REQ_RESP_SENT_REQUESTS = "aztec.p2p.req_resp.sent_requests";
|
|
65
|
-
export declare const P2P_REQ_RESP_RECEIVED_REQUESTS = "aztec.p2p.req_resp.received_requests";
|
|
66
|
-
export declare const P2P_REQ_RESP_FAILED_OUTBOUND_REQUESTS = "aztec.p2p.req_resp.failed_outbound_requests";
|
|
67
|
-
export declare const P2P_REQ_RESP_FAILED_INBOUND_REQUESTS = "aztec.p2p.req_resp.failed_inbound_requests";
|
|
68
|
-
export declare const PUBLIC_PROCESSOR_TX_DURATION = "aztec.public_processor.tx_duration";
|
|
69
|
-
export declare const PUBLIC_PROCESSOR_TX_COUNT = "aztec.public_processor.tx_count";
|
|
70
|
-
export declare const PUBLIC_PROCESSOR_TX_PHASE_COUNT = "aztec.public_processor.tx_phase_count";
|
|
71
|
-
export declare const PUBLIC_PROCESSOR_TX_GAS = "aztec.public_processor.tx_gas";
|
|
72
|
-
export declare const PUBLIC_PROCESSOR_PHASE_DURATION = "aztec.public_processor.phase_duration";
|
|
73
|
-
export declare const PUBLIC_PROCESSOR_PHASE_COUNT = "aztec.public_processor.phase_count";
|
|
74
|
-
export declare const PUBLIC_PROCESSOR_DEPLOY_BYTECODE_SIZE = "aztec.public_processor.deploy_bytecode_size";
|
|
75
|
-
export declare const PUBLIC_PROCESSOR_TOTAL_GAS = "aztec.public_processor.total_gas";
|
|
76
|
-
export declare const PUBLIC_PROCESSOR_TOTAL_GAS_HISTOGRAM = "aztec.public_processor.total_gas_histogram";
|
|
77
|
-
export declare const PUBLIC_PROCESSOR_GAS_RATE = "aztec.public_processor.gas_rate";
|
|
78
|
-
export declare const PUBLIC_PROCESSOR_TREE_INSERTION = "aztec.public_processor.tree_insertion";
|
|
79
|
-
export declare const PUBLIC_EXECUTOR_SIMULATION_COUNT = "aztec.public_executor.simulation_count";
|
|
80
|
-
export declare const PUBLIC_EXECUTOR_SIMULATION_DURATION = "aztec.public_executor.simulation_duration";
|
|
81
|
-
export declare const PUBLIC_EXECUTOR_SIMULATION_MANA_PER_SECOND = "aztec.public_executor.simulation_mana_per_second";
|
|
82
|
-
export declare const PUBLIC_EXECUTION_SIMULATION_BYTECODE_SIZE = "aztec.public_executor.simulation_bytecode_size";
|
|
83
|
-
export declare const PUBLIC_EXECUTION_PRIVATE_EFFECTS_INSERTION = "aztec.public_executor.private_effects_insertion";
|
|
84
|
-
export declare const PROVING_ORCHESTRATOR_BASE_ROLLUP_INPUTS_DURATION = "aztec.proving_orchestrator.base_rollup.inputs_duration";
|
|
85
|
-
export declare const PROVING_QUEUE_JOB_SIZE = "aztec.proving_queue.job_size";
|
|
86
|
-
export declare const PROVING_QUEUE_SIZE = "aztec.proving_queue.size";
|
|
87
|
-
export declare const PROVING_QUEUE_TOTAL_JOBS = "aztec.proving_queue.enqueued_jobs_count";
|
|
88
|
-
export declare const PROVING_QUEUE_CACHED_JOBS = "aztec.proving_queue.cached_jobs_count";
|
|
89
|
-
export declare const PROVING_QUEUE_ACTIVE_JOBS = "aztec.proving_queue.active_jobs_count";
|
|
90
|
-
export declare const PROVING_QUEUE_RESOLVED_JOBS = "aztec.proving_queue.resolved_jobs_count";
|
|
91
|
-
export declare const PROVING_QUEUE_REJECTED_JOBS = "aztec.proving_queue.rejected_jobs_count";
|
|
92
|
-
export declare const PROVING_QUEUE_RETRIED_JOBS = "aztec.proving_queue.retried_jobs_count";
|
|
93
|
-
export declare const PROVING_QUEUE_TIMED_OUT_JOBS = "aztec.proving_queue.timed_out_jobs_count";
|
|
94
|
-
export declare const PROVING_QUEUE_JOB_WAIT = "aztec.proving_queue.job_wait";
|
|
95
|
-
export declare const PROVING_QUEUE_JOB_DURATION = "aztec.proving_queue.job_duration";
|
|
96
|
-
export declare const PROVING_QUEUE_DB_NUM_ITEMS = "aztec.proving_queue.db.num_items";
|
|
97
|
-
export declare const PROVING_QUEUE_DB_MAP_SIZE = "aztec.proving_queue.db.map_size";
|
|
98
|
-
export declare const PROVING_QUEUE_DB_USED_SIZE = "aztec.proving_queue.db.used_size";
|
|
99
|
-
export declare const PROVING_AGENT_IDLE = "aztec.proving_queue.agent.idle";
|
|
100
|
-
export declare const PROVER_NODE_EXECUTION_DURATION = "aztec.prover_node.execution.duration";
|
|
101
|
-
export declare const PROVER_NODE_JOB_DURATION = "aztec.prover_node.job_duration";
|
|
102
|
-
export declare const PROVER_NODE_JOB_BLOCKS = "aztec.prover_node.job_blocks";
|
|
103
|
-
export declare const PROVER_NODE_JOB_TRANSACTIONS = "aztec.prover_node.job_transactions";
|
|
104
|
-
export declare const WORLD_STATE_FORK_DURATION = "aztec.world_state.fork.duration";
|
|
105
|
-
export declare const WORLD_STATE_SYNC_DURATION = "aztec.world_state.sync.duration";
|
|
106
|
-
export declare const WORLD_STATE_MERKLE_TREE_SIZE = "aztec.world_state.merkle_tree_size";
|
|
107
|
-
export declare const WORLD_STATE_DB_SIZE = "aztec.world_state.db_size";
|
|
108
|
-
export declare const WORLD_STATE_DB_MAP_SIZE = "aztec.world_state.db_map_size";
|
|
109
|
-
export declare const WORLD_STATE_TREE_SIZE = "aztec.world_state.tree_size";
|
|
110
|
-
export declare const WORLD_STATE_UNFINALISED_HEIGHT = "aztec.world_state.unfinalised_height";
|
|
111
|
-
export declare const WORLD_STATE_FINALISED_HEIGHT = "aztec.world_state.finalised_height";
|
|
112
|
-
export declare const WORLD_STATE_OLDEST_BLOCK = "aztec.world_state.oldest_block";
|
|
113
|
-
export declare const WORLD_STATE_DB_USED_SIZE = "aztec.world_state.db_used_size";
|
|
114
|
-
export declare const WORLD_STATE_DB_NUM_ITEMS = "aztec.world_state.db_num_items";
|
|
115
|
-
export declare const WORLD_STATE_REQUEST_TIME = "aztec.world_state.request_time";
|
|
116
|
-
export declare const WORLD_STATE_CRITICAL_ERROR_COUNT = "aztec.world_state.critical_error_count";
|
|
117
|
-
export declare const PROOF_VERIFIER_COUNT = "aztec.proof_verifier.count";
|
|
118
|
-
export declare const VALIDATOR_RE_EXECUTION_TIME = "aztec.validator.re_execution_time";
|
|
119
|
-
export declare const VALIDATOR_FAILED_REEXECUTION_COUNT = "aztec.validator.failed_reexecution_count";
|
|
120
|
-
export declare const NODEJS_EVENT_LOOP_DELAY_MIN = "nodejs.eventloop.delay.min";
|
|
121
|
-
export declare const NODEJS_EVENT_LOOP_DELAY_MEAN = "nodejs.eventloop.delay.mean";
|
|
122
|
-
export declare const NODEJS_EVENT_LOOP_DELAY_MAX = "nodejs.eventloop.delay.max";
|
|
123
|
-
export declare const NODEJS_EVENT_LOOP_DELAY_STDDEV = "nodejs.eventloop.delay.stddev";
|
|
124
|
-
export declare const NODEJS_EVENT_LOOP_DELAY_P50 = "nodejs.eventloop.delay.p50";
|
|
125
|
-
export declare const NODEJS_EVENT_LOOP_DELAY_P90 = "nodejs.eventloop.delay.p90";
|
|
126
|
-
export declare const NODEJS_EVENT_LOOP_DELAY_P99 = "nodejs.eventloop.delay.p99";
|
|
127
|
-
export declare const NODEJS_EVENT_LOOP_UTILIZATION = "nodejs.eventloop.utilization";
|
|
128
|
-
export declare const NODEJS_EVENT_LOOP_TIME = "nodejs.eventloop.time";
|
|
129
|
-
//# sourceMappingURL=metrics.d.ts.map
|
package/dest/metrics.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../src/metrics.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,+BAA+B,0CAA0C,CAAC;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,CAAC"}
|
package/dest/noop.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Meter, type Span, type Tracer } from '@opentelemetry/api';
|
|
2
|
-
import type { TelemetryClient } from './telemetry.js';
|
|
3
|
-
export declare class NoopTelemetryClient implements TelemetryClient {
|
|
4
|
-
getMeter(): Meter;
|
|
5
|
-
getTracer(): Tracer;
|
|
6
|
-
stop(): Promise<void>;
|
|
7
|
-
flush(): Promise<void>;
|
|
8
|
-
isEnabled(): boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare class NoopTracer implements Tracer {
|
|
11
|
-
startSpan(): Span;
|
|
12
|
-
startActiveSpan<F extends (...args: any[]) => any>(_name: string, ...args: (unknown | F)[]): ReturnType<F>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=noop.d.ts.map
|
package/dest/noop.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/dest/otel.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type Logger } from '@aztec/foundation/log';
|
|
2
|
-
import { type Meter, type Tracer, type TracerProvider } from '@opentelemetry/api';
|
|
3
|
-
import { HostMetrics } from '@opentelemetry/host-metrics';
|
|
4
|
-
import type { IResource } from '@opentelemetry/resources';
|
|
5
|
-
import type { LoggerProvider } from '@opentelemetry/sdk-logs';
|
|
6
|
-
import { MeterProvider, type PeriodicExportingMetricReaderOptions } from '@opentelemetry/sdk-metrics';
|
|
7
|
-
import type { TelemetryClientConfig } from './config.js';
|
|
8
|
-
import { EventLoopMonitor } from './event_loop_monitor.js';
|
|
9
|
-
import type { TelemetryClient } from './telemetry.js';
|
|
10
|
-
export type OpenTelemetryClientFactory = (resource: IResource, log: Logger) => OpenTelemetryClient;
|
|
11
|
-
export declare class OpenTelemetryClient implements TelemetryClient {
|
|
12
|
-
private resource;
|
|
13
|
-
private meterProvider;
|
|
14
|
-
private traceProvider;
|
|
15
|
-
private loggerProvider;
|
|
16
|
-
private log;
|
|
17
|
-
hostMetrics: HostMetrics | undefined;
|
|
18
|
-
eventLoopMonitor: EventLoopMonitor | undefined;
|
|
19
|
-
private meters;
|
|
20
|
-
private tracers;
|
|
21
|
-
protected constructor(resource: IResource, meterProvider: MeterProvider, traceProvider: TracerProvider, loggerProvider: LoggerProvider | undefined, log: Logger);
|
|
22
|
-
getMeter(name: string): Meter;
|
|
23
|
-
getTracer(name: string): Tracer;
|
|
24
|
-
start(): void;
|
|
25
|
-
isEnabled(): boolean;
|
|
26
|
-
flush(): Promise<void>;
|
|
27
|
-
stop(): Promise<void>;
|
|
28
|
-
static createMeterProvider(resource: IResource, options: Partial<PeriodicExportingMetricReaderOptions>): MeterProvider;
|
|
29
|
-
private static getCustomClientFactory;
|
|
30
|
-
static createAndStart(config: TelemetryClientConfig, log: Logger): OpenTelemetryClient;
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=otel.d.ts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GAAG,EAAE,MAAM;IAGrB,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,OAAO,EAAE,OAAO,CAAC,oCAAoC,CAAC,GACrD,aAAa;IAkHhB,OAAO,CAAC,MAAM,CAAC,sBAAsB;WA4BvB,cAAc,CAAC,MAAM,EAAE,qBAAqB,EAAE,GAAG,EAAE,MAAM,GAAG,mBAAmB;CAS9F"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { ExportResult } from '@opentelemetry/core';
|
|
2
|
-
import type { PushMetricExporter, ResourceMetrics } from '@opentelemetry/sdk-metrics';
|
|
3
|
-
export declare class OtelFilterMetricExporter implements PushMetricExporter {
|
|
4
|
-
private readonly exporter;
|
|
5
|
-
private readonly excludeMetricPrefixes;
|
|
6
|
-
constructor(exporter: PushMetricExporter, excludeMetricPrefixes: string[]);
|
|
7
|
-
export(metrics: ResourceMetrics, resultCallback: (result: ExportResult) => void): void;
|
|
8
|
-
private filterMetrics;
|
|
9
|
-
forceFlush(): Promise<void>;
|
|
10
|
-
shutdown(): Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=otel_filter_metric_exporter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,4 +0,0 @@
|
|
|
1
|
-
import type { IResource } from '@opentelemetry/resources';
|
|
2
|
-
import { LoggerProvider } from '@opentelemetry/sdk-logs';
|
|
3
|
-
export declare function registerOtelLoggerProvider(resource: IResource, otelLogsUrl?: URL): LoggerProvider;
|
|
4
|
-
//# sourceMappingURL=otel_logger_provider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"otel_logger_provider.d.ts","sourceRoot":"","sources":["../src/otel_logger_provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAA2B,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAElF,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE,GAAG,kBAwBhF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"otel_propagation.d.ts","sourceRoot":"","sources":["../src/otel_propagation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAU3B,wBAAgB,mCAAmC,CACjD,KAAK,SAAkB,GACtB,CAAC,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAoChE"}
|
package/dest/otel_resource.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"otel_resource.d.ts","sourceRoot":"","sources":["../src/otel_resource.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,0BAA0B,CAAC;AAElC,wBAAgB,eAAe,IAAI,SAAS,CAM3C"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { type Logger } from '@aztec/foundation/log';
|
|
2
|
-
import { Registry } from 'prom-client';
|
|
3
|
-
import type { Meter, TelemetryClient } from './telemetry.js';
|
|
4
|
-
/**
|
|
5
|
-
* Types matching the gossipsub and libp2p services
|
|
6
|
-
*/
|
|
7
|
-
type TopicStr = string;
|
|
8
|
-
export type TopicLabel = string;
|
|
9
|
-
export type TopicStrToLabel = Map<TopicStr, TopicLabel>;
|
|
10
|
-
export declare enum MessageSource {
|
|
11
|
-
forward = "forward",
|
|
12
|
-
publish = "publish"
|
|
13
|
-
}
|
|
14
|
-
type NoLabels = Record<string, never>;
|
|
15
|
-
type LabelsGeneric = Record<string, string | number>;
|
|
16
|
-
type LabelKeys<Labels extends LabelsGeneric> = Extract<keyof Labels, string>;
|
|
17
|
-
interface CollectFn<Labels extends LabelsGeneric> {
|
|
18
|
-
(metric: IGauge<Labels>): void;
|
|
19
|
-
}
|
|
20
|
-
interface IGauge<Labels extends LabelsGeneric = NoLabels> {
|
|
21
|
-
inc: NoLabels extends Labels ? (value?: number) => void : (labels: Labels, value?: number) => void;
|
|
22
|
-
set: NoLabels extends Labels ? (value: number) => void : (labels: Labels, value: number) => void;
|
|
23
|
-
collect?(): void;
|
|
24
|
-
addCollect(collectFn: CollectFn<Labels>): void;
|
|
25
|
-
}
|
|
26
|
-
interface IHistogram<Labels extends LabelsGeneric = NoLabels> {
|
|
27
|
-
startTimer(): () => void;
|
|
28
|
-
observe: NoLabels extends Labels ? (value: number) => void : (labels: Labels, value: number) => void;
|
|
29
|
-
reset(): void;
|
|
30
|
-
}
|
|
31
|
-
interface IAvgMinMax<Labels extends LabelsGeneric = NoLabels> {
|
|
32
|
-
set: NoLabels extends Labels ? (values: number[]) => void : (labels: Labels, values: number[]) => void;
|
|
33
|
-
}
|
|
34
|
-
export type GaugeConfig<Labels extends LabelsGeneric> = {
|
|
35
|
-
name: string;
|
|
36
|
-
help: string;
|
|
37
|
-
} & (NoLabels extends Labels ? {
|
|
38
|
-
labelNames?: never;
|
|
39
|
-
} : {
|
|
40
|
-
labelNames: [LabelKeys<Labels>, ...Array<LabelKeys<Labels>>];
|
|
41
|
-
});
|
|
42
|
-
export type HistogramConfig<Labels extends LabelsGeneric> = GaugeConfig<Labels> & {
|
|
43
|
-
buckets?: number[];
|
|
44
|
-
};
|
|
45
|
-
export type AvgMinMaxConfig<Labels extends LabelsGeneric> = GaugeConfig<Labels>;
|
|
46
|
-
export interface MetricsRegister {
|
|
47
|
-
gauge<Labels extends LabelsGeneric = NoLabels>(config: GaugeConfig<Labels>): IGauge<Labels>;
|
|
48
|
-
histogram<Labels extends LabelsGeneric = NoLabels>(config: HistogramConfig<Labels>): IHistogram<Labels>;
|
|
49
|
-
avgMinMax<Labels extends LabelsGeneric = NoLabels>(config: AvgMinMaxConfig<Labels>): IAvgMinMax<Labels>;
|
|
50
|
-
}
|
|
51
|
-
/**Otel MetricsType Adapters
|
|
52
|
-
*
|
|
53
|
-
* Some dependencies we use export metrics directly in a Prometheus format
|
|
54
|
-
* This adapter is used to convert those metrics to a format that we can use with OpenTelemetry
|
|
55
|
-
*
|
|
56
|
-
* Affected services include:
|
|
57
|
-
* - chainsafe/gossipsub
|
|
58
|
-
* - libp2p
|
|
59
|
-
*/
|
|
60
|
-
export declare class OtelGauge<Labels extends LabelsGeneric = NoLabels> implements IGauge<Labels> {
|
|
61
|
-
private logger;
|
|
62
|
-
private labelNames;
|
|
63
|
-
private gauge;
|
|
64
|
-
private currentValue;
|
|
65
|
-
private labeledValues;
|
|
66
|
-
private collectFns;
|
|
67
|
-
private _collect;
|
|
68
|
-
get collect(): () => void;
|
|
69
|
-
set collect(fn: () => void);
|
|
70
|
-
constructor(logger: Logger, meter: Meter, name: string, help: string, labelNames?: Array<keyof Labels>);
|
|
71
|
-
/**
|
|
72
|
-
* Add a collect callback
|
|
73
|
-
* @param collectFn - Callback function
|
|
74
|
-
*/
|
|
75
|
-
addCollect(collectFn: CollectFn<Labels>): void;
|
|
76
|
-
handleObservation(result: any): void;
|
|
77
|
-
/**
|
|
78
|
-
* Increments the gauge value
|
|
79
|
-
* @param labelsOrValue - Labels object or numeric value
|
|
80
|
-
* @param value - Value to increment by (defaults to 1)
|
|
81
|
-
*/
|
|
82
|
-
inc(value?: number): void;
|
|
83
|
-
inc(labels: Labels, value?: number): void;
|
|
84
|
-
/**
|
|
85
|
-
* Sets the gauge value
|
|
86
|
-
* @param labelsOrValue - Labels object or numeric value
|
|
87
|
-
* @param value - Value to set
|
|
88
|
-
*/
|
|
89
|
-
set(value: number): void;
|
|
90
|
-
set(labels: Labels, value: number): void;
|
|
91
|
-
/**
|
|
92
|
-
* Decrements the gauge value
|
|
93
|
-
* @param labels - Optional labels object
|
|
94
|
-
*/
|
|
95
|
-
dec(labels?: Labels): void;
|
|
96
|
-
/**
|
|
97
|
-
* Resets the gauge to initial state
|
|
98
|
-
*/
|
|
99
|
-
reset(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Validates that provided labels match the expected schema
|
|
102
|
-
* @param labels - Labels object to validate
|
|
103
|
-
* @throws Error if invalid labels are provided
|
|
104
|
-
*/
|
|
105
|
-
private validateLabels;
|
|
106
|
-
/**
|
|
107
|
-
* Safely parses label string back to object
|
|
108
|
-
* @param labelStr - Stringified labels object
|
|
109
|
-
* @returns Labels object or null if parsing fails
|
|
110
|
-
*/
|
|
111
|
-
private parseLabelsSafely;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Otel metrics Adapter
|
|
115
|
-
*
|
|
116
|
-
* Maps the PromClient based MetricsRegister from gossipsub and discv5 services to the Otel MetricsRegister
|
|
117
|
-
*/
|
|
118
|
-
export declare class OtelMetricsAdapter extends Registry implements MetricsRegister {
|
|
119
|
-
private logger;
|
|
120
|
-
private readonly meter;
|
|
121
|
-
constructor(telemetryClient: TelemetryClient, logger?: Logger);
|
|
122
|
-
gauge<Labels extends LabelsGeneric = NoLabels>(configuration: GaugeConfig<Labels>): IGauge<Labels>;
|
|
123
|
-
histogram<Labels extends LabelsGeneric = NoLabels>(configuration: HistogramConfig<Labels>): IHistogram<Labels>;
|
|
124
|
-
avgMinMax<Labels extends LabelsGeneric = NoLabels>(configuration: AvgMinMaxConfig<Labels>): IAvgMinMax<Labels>;
|
|
125
|
-
}
|
|
126
|
-
export {};
|
|
127
|
-
//# sourceMappingURL=prom_otel_adapter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prom_otel_adapter.d.ts","sourceRoot":"","sources":["../src/prom_otel_adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,KAAK,EAAE,KAAK,EAAgC,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE3F;;GAEG;AACH,KAAK,QAAQ,GAAG,MAAM,CAAC;AACvB,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAChC,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AAExD,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACtC,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AACrD,KAAK,SAAS,CAAC,MAAM,SAAS,aAAa,IAAI,OAAO,CAAC,MAAM,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7E,UAAU,SAAS,CAAC,MAAM,SAAS,aAAa;IAC9C,CAAC,MAAM,EAAE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AC,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC;CAS/G"}
|
package/dest/start.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TelemetryClientConfig } from './config.js';
|
|
2
|
-
import type { TelemetryClient } from './telemetry.js';
|
|
3
|
-
export * from './config.js';
|
|
4
|
-
export declare function initTelemetryClient(config: TelemetryClientConfig): TelemetryClient;
|
|
5
|
-
export declare function getTelemetryClient(): TelemetryClient;
|
|
6
|
-
//# sourceMappingURL=start.d.ts.map
|
package/dest/start.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEtD,cAAc,aAAa,CAAC;AAK5B,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,qBAAqB,GAAG,eAAe,CAgBlF;AAED,wBAAgB,kBAAkB,IAAI,eAAe,CAEpD"}
|
package/dest/telemetry.d.ts
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { type AttributeValue, type BatchObservableCallback, type MetricOptions, type Observable, type BatchObservableResult as OtelBatchObservableResult, type Gauge as OtelGauge, type Histogram as OtelHistogram, type ObservableGauge as OtelObservableGauge, type ObservableResult as OtelObservableResult, type ObservableUpDownCounter as OtelObservableUpDownCounter, type UpDownCounter as OtelUpDownCounter, type Span, type Tracer } from '@opentelemetry/api';
|
|
2
|
-
import type * as Attributes from './attributes.js';
|
|
3
|
-
import type * as Metrics from './metrics.js';
|
|
4
|
-
export { type Span, SpanStatusCode, ValueType } from '@opentelemetry/api';
|
|
5
|
-
type ValuesOf<T> = T extends Record<string, infer U> ? U : never;
|
|
6
|
-
/** Global registry of attributes */
|
|
7
|
-
type AttributesType = Partial<Record<ValuesOf<typeof Attributes>, AttributeValue>>;
|
|
8
|
-
export type { AttributesType };
|
|
9
|
-
/** Global registry of metrics */
|
|
10
|
-
type MetricsType = (typeof Metrics)[keyof typeof Metrics];
|
|
11
|
-
export type { MetricsType };
|
|
12
|
-
export type Gauge = OtelGauge<AttributesType>;
|
|
13
|
-
export type Histogram = OtelHistogram<AttributesType>;
|
|
14
|
-
export type UpDownCounter = OtelUpDownCounter<AttributesType>;
|
|
15
|
-
export type ObservableGauge = OtelObservableGauge<AttributesType>;
|
|
16
|
-
export type ObservableUpDownCounter = OtelObservableUpDownCounter<AttributesType>;
|
|
17
|
-
export type ObservableResult = OtelObservableResult<AttributesType>;
|
|
18
|
-
export type BatchObservableResult = OtelBatchObservableResult<AttributesType>;
|
|
19
|
-
export type { Tracer };
|
|
20
|
-
/**
|
|
21
|
-
* A meter that provides instruments for recording metrics.
|
|
22
|
-
*/
|
|
23
|
-
export interface Meter {
|
|
24
|
-
/**
|
|
25
|
-
* Creates a new gauge instrument. A gauge is a metric that represents a single numerical value that can arbitrarily go up and down.
|
|
26
|
-
* @param name - The name of the gauge
|
|
27
|
-
* @param options - The options for the gauge
|
|
28
|
-
*/
|
|
29
|
-
createGauge(name: MetricsType, options?: MetricOptions): Gauge;
|
|
30
|
-
/**
|
|
31
|
-
* Creates a new gauge instrument. A gauge is a metric that represents a single numerical value that can arbitrarily go up and down.
|
|
32
|
-
* @param name - The name of the gauge
|
|
33
|
-
* @param options - The options for the gauge
|
|
34
|
-
*/
|
|
35
|
-
createObservableGauge(name: MetricsType, options?: MetricOptions): ObservableGauge;
|
|
36
|
-
addBatchObservableCallback(callback: BatchObservableCallback<AttributesType>, observables: Observable<AttributesType>[]): void;
|
|
37
|
-
removeBatchObservableCallback(callback: BatchObservableCallback<AttributesType>, observables: Observable<AttributesType>[]): void;
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new histogram instrument. A histogram is a metric that samples observations (usually things like request durations or response sizes) and counts them in configurable buckets.
|
|
40
|
-
* @param name - The name of the histogram
|
|
41
|
-
* @param options - The options for the histogram
|
|
42
|
-
*/
|
|
43
|
-
createHistogram(name: MetricsType, options?: MetricOptions): Histogram;
|
|
44
|
-
/**
|
|
45
|
-
* Creates a new counter instrument. A counter can go up or down with a delta from the previous value.
|
|
46
|
-
* @param name - The name of the counter
|
|
47
|
-
* @param options - The options for the counter
|
|
48
|
-
*/
|
|
49
|
-
createUpDownCounter(name: MetricsType, options?: MetricOptions): UpDownCounter;
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new gauge instrument. A gauge is a metric that represents a single numerical value that can arbitrarily go up and down.
|
|
52
|
-
* @param name - The name of the gauge
|
|
53
|
-
* @param options - The options for the gauge
|
|
54
|
-
*/
|
|
55
|
-
createObservableUpDownCounter(name: MetricsType, options?: MetricOptions): ObservableUpDownCounter;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* A telemetry client that provides meters for recording metrics.
|
|
59
|
-
*/
|
|
60
|
-
export interface TelemetryClient {
|
|
61
|
-
/**
|
|
62
|
-
* Whether the client is enabled and reporting metrics.
|
|
63
|
-
**/
|
|
64
|
-
isEnabled(): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Creates a new meter
|
|
67
|
-
* @param name - The name of the meter.
|
|
68
|
-
*/
|
|
69
|
-
getMeter(name: string): Meter;
|
|
70
|
-
/**
|
|
71
|
-
* Creates a new tracer
|
|
72
|
-
* @param name - The name of the tracer.
|
|
73
|
-
*/
|
|
74
|
-
getTracer(name: string): Tracer;
|
|
75
|
-
/**
|
|
76
|
-
* Stops the telemetry client.
|
|
77
|
-
*/
|
|
78
|
-
stop(): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Flushes the telemetry client.
|
|
81
|
-
*/
|
|
82
|
-
flush(): Promise<void>;
|
|
83
|
-
}
|
|
84
|
-
/** Objects that adhere to this interface can use @trackSpan */
|
|
85
|
-
export interface Traceable {
|
|
86
|
-
tracer: Tracer;
|
|
87
|
-
}
|
|
88
|
-
type SpanDecorator<T extends Traceable, F extends (...args: any[]) => any> = (originalMethod: F, context: ClassMethodDecoratorContext<T>) => F;
|
|
89
|
-
/**
|
|
90
|
-
* Starts a new span whenever the decorated method is called.
|
|
91
|
-
* @param spanName - The name of the span to create. Can be a string or a function that returns a string.
|
|
92
|
-
* @param attributes - Initial attributes to set on the span. If a function is provided, it will be called with the arguments of the method.
|
|
93
|
-
* @param extraAttributes - Extra attributes to set on the span after the method is called. Will be called with the return value of the method. Note: if the function throws then this will not be called.
|
|
94
|
-
* @returns A decorator that wraps the method in a span.
|
|
95
|
-
*
|
|
96
|
-
* @privateRemarks
|
|
97
|
-
* This code looks complex but it's not that difficult:
|
|
98
|
-
* - decorators are functions that _replace_ a method with a different implementation
|
|
99
|
-
* - normal decorators can't take function arguments, but if we write a function that returns a decorator, we can pass arguments to that function
|
|
100
|
-
*
|
|
101
|
-
* The trackSpan function takes a span's name and some attributes and builds a decorator that wraps a method in a span with the given name and props
|
|
102
|
-
* The decorator can currently only be applied to methods on classes that have a `tracer` property. The compiler will enforce this.
|
|
103
|
-
*/
|
|
104
|
-
export declare function trackSpan<T extends Traceable, F extends (...args: any[]) => any>(spanName: string | ((this: T, ...args: Parameters<F>) => string), attributes?: AttributesType | ((this: T, ...args: Parameters<F>) => Promise<AttributesType> | AttributesType), extraAttributes?: (this: T, returnValue: Awaited<ReturnType<F>>) => AttributesType): SpanDecorator<T, F>;
|
|
105
|
-
/**
|
|
106
|
-
* Runs an event callback in a span. The span is started immediately and completes once the callback finishes running.
|
|
107
|
-
* The span will have two events added: 'callbackStart' and 'callbackEnd' to mark the start and end of the callback.
|
|
108
|
-
*
|
|
109
|
-
* @param tracer - The tracer instance to use
|
|
110
|
-
* @param spanName - The name of the span to create
|
|
111
|
-
* @param attributes - Initial attributes to set on the span
|
|
112
|
-
* @param callback - The callback to wrap in a span
|
|
113
|
-
*
|
|
114
|
-
* @returns - A new function that wraps the callback in a span
|
|
115
|
-
*/
|
|
116
|
-
export declare function wrapCallbackInSpan<F extends (...args: any[]) => any>(tracer: Tracer, spanName: string, attributes: AttributesType, callback: F): F;
|
|
117
|
-
export declare function runInSpan<A extends any[], R>(tracer: Tracer | string, spanName: string, callback: (span: Span, ...args: A) => R): (...args: A) => R;
|
|
118
|
-
//# sourceMappingURL=telemetry.d.ts.map
|
package/dest/telemetry.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,KAAK,IAAI,SAAS,EACvB,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,eAAe,IAAI,mBAAmB,EAC3C,KAAK,gBAAgB,IAAI,oBAAoB,EAC7C,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,IAAI,EAET,KAAK,MAAM,EACZ,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,KAAK,UAAU,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,KAAK,OAAO,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,KAAK,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1E,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAEjE,oCAAoC;AACpC,KAAK,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,UAAU,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC;AACnF,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,iCAAiC;AACjC,KAAK,WAAW,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAA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OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,cAAc,GACjF,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAiCrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EAClE,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,cAAc,EAC1B,QAAQ,EAAE,CAAC,GACV,CAAC,CAkBH;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,GAAG,EAAE,EAAE,CAAC,EAC1C,MAAM,EAAE,MAAM,GAAG,MAAM,EACvB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GACtC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,CAoCnB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const ATTR_JSONRPC_METHOD = "rpc.method";
|
|
2
|
-
export declare const ATTR_JSONRPC_REQUEST_ID = "rpc.jsonrpc.request_id";
|
|
3
|
-
export declare const ATTR_JSONRPC_ERROR_CODE = "rpc.jsonrpc.error_code";
|
|
4
|
-
export declare const ATTR_JSONRPC_ERROR_MSG = "rpc.jsonrpc.error_message";
|
|
5
|
-
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../src/vendor/attributes.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAChD,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAChE,eAAO,MAAM,sBAAsB,8BAA8B,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
-
import { Writable } from 'stream';
|
|
3
|
-
/**
|
|
4
|
-
* Return a function that knows how to convert the "time" field value on a
|
|
5
|
-
* Pino log record to an OTel LogRecord timestamp value.
|
|
6
|
-
*
|
|
7
|
-
* How to convert the serialized "time" on a Pino log record
|
|
8
|
-
* depends on the Logger's `Symbol(pino.time)` prop, configurable
|
|
9
|
-
* via https://getpino.io/#/docs/api?id=timestamp-boolean-function
|
|
10
|
-
*
|
|
11
|
-
* For example:
|
|
12
|
-
* const logger = pino({timestamp: pino.stdTimeFunctions.isoTime})
|
|
13
|
-
* results in log record entries of the form:
|
|
14
|
-
* ,"time":"2024-05-17T22:03:25.969Z"
|
|
15
|
-
* `otelTimestampFromTime` will be given the value of the "time" field:
|
|
16
|
-
* "2024-05-17T22:03:25.969Z"
|
|
17
|
-
* which should be parsed to a number of milliseconds since the epoch.
|
|
18
|
-
*/
|
|
19
|
-
export declare function getTimeConverter(pinoLogger: any, pinoMod: any): ((time: number) => number) | ((time: string) => number);
|
|
20
|
-
interface OTelPinoStreamOptions {
|
|
21
|
-
messageKey?: string;
|
|
22
|
-
levels: any;
|
|
23
|
-
otelTimestampFromTime?: (time: any) => number;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* A Pino stream for sending records to the OpenTelemetry Logs API.
|
|
27
|
-
*
|
|
28
|
-
* - This stream emits an 'unknown' event on an unprocessable pino record.
|
|
29
|
-
* The event arguments are: `logLine: string`, `err: string | Error`.
|
|
30
|
-
*/
|
|
31
|
-
export declare class OTelPinoStream extends Writable {
|
|
32
|
-
private _otelLogger;
|
|
33
|
-
private _messageKey;
|
|
34
|
-
private _levels;
|
|
35
|
-
private _otelTimestampFromTime;
|
|
36
|
-
constructor(options: OTelPinoStreamOptions);
|
|
37
|
-
_write(s: string, _encoding: string, callback: Function): void;
|
|
38
|
-
}
|
|
39
|
-
export default function (options: OTelPinoStreamOptions): OTelPinoStream;
|
|
40
|
-
export {};
|
|
41
|
-
//# sourceMappingURL=otel-pino-stream.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"otel-pino-stream.d.ts","sourceRoot":"","sources":["../../src/vendor/otel-pino-stream.ts"],"names":[],"mappings":";AAoBA,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AA8ElC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,WAI5C,MAAM,uBAIN,MAAM,aAOvB;AAED,UAAU,qBAAqB;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,GAAG,CAAC;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,MAAM,CAAC;CAC/C;AAED;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,QAAQ;IAC1C,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,OAAO,CAAC;IAChB,OAAO,CAAC,sBAAsB,CAAC;gBAEnB,OAAO,EAAE,qBAAqB;IAmBjC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;CAqGjE;AAMD,MAAM,CAAC,OAAO,WAAW,OAAO,EAAE,qBAAqB,GAAG,cAAc,CAMvE"}
|
package/dest/with_tracer.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { TelemetryClient, Tracer } from './telemetry.js';
|
|
2
|
-
/**
|
|
3
|
-
* A minimal class that enables recording metrics with a telemetry client.
|
|
4
|
-
* This base class enables tracing
|
|
5
|
-
*
|
|
6
|
-
* In other words:
|
|
7
|
-
* Enables the ability to call `@trackSpan` on methods.
|
|
8
|
-
*
|
|
9
|
-
* Example:
|
|
10
|
-
*
|
|
11
|
-
* ```
|
|
12
|
-
* import {Attributes, type TelemetryClient, WithTracer, trackSpan } from '@aztec/telemetry-client';
|
|
13
|
-
*
|
|
14
|
-
* class MyClass extends WithTracer {
|
|
15
|
-
* // Constructor is required to be passed the TelemetryClient implementation.
|
|
16
|
-
* constructor(client: TelemetryClient) {
|
|
17
|
-
* super(client, 'MyClass');
|
|
18
|
-
* }
|
|
19
|
-
*
|
|
20
|
-
* @trackSpan('MyClass.myMethod', (arg: string) => ({
|
|
21
|
-
* [Attributes.ARG]: arg,
|
|
22
|
-
* }))
|
|
23
|
-
* public myMethod(arg: string) {
|
|
24
|
-
* // ...
|
|
25
|
-
* }
|
|
26
|
-
* }
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export declare class WithTracer {
|
|
30
|
-
readonly tracer: Tracer;
|
|
31
|
-
constructor(client: TelemetryClient, name: string);
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=with_tracer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"with_tracer.d.ts","sourceRoot":"","sources":["../src/with_tracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,UAAU;IACrB,SAAgB,MAAM,EAAE,MAAM,CAAC;gBACnB,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM;CAGlD"}
|
package/dest/wrappers/fetch.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defaultFetch } from '@aztec/foundation/json-rpc/client';
|
|
2
|
-
import type { Logger } from '@aztec/foundation/log';
|
|
3
|
-
/**
|
|
4
|
-
* Makes a fetch function that retries based on the given attempts and propagates trace information.
|
|
5
|
-
* @param retries - Sequence of intervals (in seconds) to retry.
|
|
6
|
-
* @param noRetry - Whether to stop retries on server errors.
|
|
7
|
-
* @param log - Optional logger for logging attempts.
|
|
8
|
-
* @returns A fetch function.
|
|
9
|
-
*/
|
|
10
|
-
export declare function makeTracedFetch(retries: number[], defaultNoRetry: boolean, fetch?: typeof defaultFetch, log?: Logger): (host: string, rpcMethod: string, body: any, useApiEndpoints: boolean, extraHeaders?: Record<string, string>, noRetry?: boolean) => Promise<{
|
|
11
|
-
response: any;
|
|
12
|
-
headers: {
|
|
13
|
-
get: (header: string) => string | null | undefined;
|
|
14
|
-
};
|
|
15
|
-
}>;
|
|
16
|
-
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/wrappers/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAQpD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,sBAAe,EAAE,GAAG,CAAC,EAAE,MAAM,UAEpG,MAAM,aACD,MAAM,QACX,GAAG,mBACQ,OAAO,iBACV,OAAO,MAAM,EAAE,MAAM,CAAC,YAC1B,OAAO;;;;;GA4BpB"}
|
package/dest/wrappers/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wrappers/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type SafeJsonRpcServerOptions } from '@aztec/foundation/json-rpc/server';
|
|
2
|
-
import type { ApiSchemaFor } from '@aztec/stdlib/schemas';
|
|
3
|
-
export declare function createTracedJsonRpcServer<T extends object = any>(handler: T, schema: ApiSchemaFor<T>, options?: Partial<SafeJsonRpcServerOptions>): import("@aztec/foundation/json-rpc/server").SafeJsonRpcServer;
|
|
4
|
-
//# sourceMappingURL=json_rpc_server.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"json_rpc_server.d.ts","sourceRoot":"","sources":["../../src/wrappers/json_rpc_server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAA2B,MAAM,mCAAmC,CAAC;AAC3G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,GAAG,GAAG,EAC9D,OAAO,EAAE,CAAC,EACV,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,EACvB,OAAO,GAAE,OAAO,CAAC,wBAAwB,CAAM,iEAMhD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type L2BlockSource, L2BlockStream, type L2BlockStreamEventHandler, type L2BlockStreamLocalDataProvider } from '@aztec/stdlib/block';
|
|
2
|
-
import { type Traceable, type Tracer } from '@aztec/telemetry-client';
|
|
3
|
-
/** Extends an L2BlockStream with a tracer to create a new trace per iteration. */
|
|
4
|
-
export declare class TraceableL2BlockStream extends L2BlockStream implements Traceable {
|
|
5
|
-
readonly tracer: Tracer;
|
|
6
|
-
private readonly name;
|
|
7
|
-
constructor(l2BlockSource: Pick<L2BlockSource, 'getBlocks' | 'getBlockHeader' | 'getL2Tips'>, localData: L2BlockStreamLocalDataProvider, handler: L2BlockStreamEventHandler, tracer: Tracer, name?: string, log?: import("@aztec/foundation/log").Logger, opts?: {
|
|
8
|
-
proven?: boolean;
|
|
9
|
-
pollIntervalMS?: number;
|
|
10
|
-
batchSize?: number;
|
|
11
|
-
startingBlock?: number;
|
|
12
|
-
});
|
|
13
|
-
work(): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=l2_block_stream.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"l2_block_stream.d.ts","sourceRoot":"","sources":["../../src/wrappers/l2_block_stream.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,aAAa,EACb,KAAK,yBAAyB,EAC9B,KAAK,8BAA8B,EACpC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAAa,MAAM,yBAAyB,CAAC;AAEjF,kFAAkF;AAClF,qBAAa,sBAAuB,SAAQ,aAAc,YAAW,SAAS;aAK1D,MAAM,EAAE,MAAM;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAJrB,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,GAAG,gBAAgB,GAAG,WAAW,CAAC,EAChF,SAAS,EAAE,8BAA8B,EACzC,OAAO,EAAE,yBAAyB,EAClB,MAAM,EAAE,MAAM,EACb,IAAI,GAAE,MAAwB,EAC/C,GAAG,yCAAqC,EACxC,IAAI,GAAE;QACJ,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;KACnB;IAUC,IAAI;CAGd"}
|