@adea-ai/telemetry 1.9.0 → 3.0.0
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/dist/catalog.d.ts +1 -1
- package/dist/catalog.js +0 -2
- package/dist/console.d.ts +2 -1
- package/dist/console.js +15 -0
- package/dist/context.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +0 -1
- package/package.json +1 -1
package/dist/catalog.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const executionTraceSpans: readonly ['execution.root', 'plan.compile', 'workflow.run', 'runtime.route', 'runtime.start', '
|
|
1
|
+
export declare const executionTraceSpans: readonly ['execution.root', 'plan.compile', 'workflow.run', 'runtime.route', 'runtime.start', 'model.call', 'tool.authorize', 'tool.execute', 'sandbox.execute', 'approval.wait', 'artifact.promote', 'usage.settle', 'execution.cleanup'];
|
|
2
2
|
export declare const operationalMetrics: readonly ['control.api.request.duration', 'control.api.error.count', 'control.command_inbox.duplicate.count', 'control.command_inbox.conflict.count', 'workflow.backlog.count', 'workflow.replay.count', 'runtime.available.count', 'runtime.gateway.connection.count', 'runtime.gateway.ack.duration', 'model.call.duration', 'model.call.error.count', 'tool.call.duration', 'tool.call.error.count', 'execution.reconciliation.count', 'execution.manual_intervention.count', 'context.provider_resolution.count', 'memory.write.decision.count', 'control.event.quarantine.count', 'usage.cost.usd', 'execution.queue.latency', 'execution.human.latency', 'execution.retry.age', 'execution.reconciliation.age', 'storage.retained.bytes', 'storage.rewritten.bytes', 'storage.growth.bytes', 'runtime.active_object.count', 'operations.operating_cost.usd'];
|
|
3
3
|
export type ExecutionTraceSpanName = (typeof executionTraceSpans)[number];
|
|
4
4
|
export type OperationalMetricName = (typeof operationalMetrics)[number];
|
package/dist/catalog.js
CHANGED
package/dist/console.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { StructuredLogger, TraceAdapter } from './types.js';
|
|
1
|
+
import type { MetricAdapter, StructuredLogger, TraceAdapter } from './types.js';
|
|
2
2
|
export declare function createConsoleTraceAdapter(logger: StructuredLogger): TraceAdapter;
|
|
3
|
+
export declare function createConsoleMetricAdapter(logger: StructuredLogger): MetricAdapter;
|
package/dist/console.js
CHANGED
|
@@ -27,6 +27,21 @@ export function createConsoleTraceAdapter(logger) {
|
|
|
27
27
|
},
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
export function createConsoleMetricAdapter(logger) {
|
|
31
|
+
const write = (instrument, name, value, attributes) => {
|
|
32
|
+
logger.write({
|
|
33
|
+
level: 'info',
|
|
34
|
+
event: 'telemetry.metric.observed',
|
|
35
|
+
metadata: attributes,
|
|
36
|
+
details: { instrument, name, value },
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
return {
|
|
40
|
+
add: (name, value, attributes) => write('counter', name, value, attributes),
|
|
41
|
+
record: (name, value, attributes) => write('histogram', name, value, attributes),
|
|
42
|
+
recordGauge: (name, value, attributes) => write('gauge', name, value, attributes),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
30
45
|
function childTraceContext(parent) {
|
|
31
46
|
const traceId = traceIdFromContext(parent) ?? randomBytes(16).toString('hex');
|
|
32
47
|
const traceparent = `00-${traceId}-${randomBytes(8).toString('hex')}-01`;
|
package/dist/context.js
CHANGED
|
@@ -15,7 +15,6 @@ export function semanticAttributes(identifiers) {
|
|
|
15
15
|
['runtime.node.id', identifiers.runtimeNodeId],
|
|
16
16
|
['agent.profile.version', identifiers.profileVersion],
|
|
17
17
|
['agent.skill.version', identifiers.skillVersion],
|
|
18
|
-
['agent.graph.version', identifiers.graphVersion],
|
|
19
18
|
['gen_ai.request.model', identifiers.modelAlias],
|
|
20
19
|
['tool.id', identifiers.toolId],
|
|
21
20
|
['policy.version', identifiers.policyVersion],
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createConsoleTraceAdapter } from './console.js';
|
|
1
|
+
export { createConsoleMetricAdapter, createConsoleTraceAdapter } from './console.js';
|
|
2
2
|
export { consistencyMetricNames, createConsistencyMetricEmitter } from './consistency.js';
|
|
3
3
|
export type { CommandInboxAcceptanceOutcome, ConsistencyMetricEmitter } from './consistency.js';
|
|
4
4
|
export { extractTraceContext, injectTraceContext, semanticAttributes, traceIdFromContext, } from './context.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createConsoleTraceAdapter } from './console.js';
|
|
1
|
+
export { createConsoleMetricAdapter, createConsoleTraceAdapter } from './console.js';
|
|
2
2
|
export { consistencyMetricNames, createConsistencyMetricEmitter } from './consistency.js';
|
|
3
3
|
export { extractTraceContext, injectTraceContext, semanticAttributes, traceIdFromContext, } from './context.js';
|
|
4
4
|
export { createStructuredLogger, jsonLogger } from './logger.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export interface TelemetryIdentifiers {
|
|
|
11
11
|
readonly runtimeNodeId?: string;
|
|
12
12
|
readonly profileVersion?: string;
|
|
13
13
|
readonly skillVersion?: string;
|
|
14
|
-
readonly graphVersion?: string;
|
|
15
14
|
readonly modelAlias?: string;
|
|
16
15
|
readonly toolId?: string;
|
|
17
16
|
readonly policyVersion?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/telemetry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Fail-open observability toolkit: structured logging, secret redaction, trace-context propagation, deterministic sampling, and pluggable OpenTelemetry, Sentry, and LangSmith adapters.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"langsmith",
|