@adea-ai/telemetry 4.0.0 → 4.1.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 -1
- package/dist/consistency.d.ts +0 -5
- package/dist/consistency.js +0 -22
- package/package.json +4 -5
package/dist/catalog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
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', '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', '
|
|
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', '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', '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];
|
|
5
5
|
export interface DiagnosticQuery {
|
package/dist/catalog.js
CHANGED
|
@@ -29,7 +29,6 @@ export const operationalMetrics = [
|
|
|
29
29
|
'execution.manual_intervention.count',
|
|
30
30
|
'context.provider_resolution.count',
|
|
31
31
|
'memory.write.decision.count',
|
|
32
|
-
'control.event.quarantine.count',
|
|
33
32
|
'usage.cost.usd',
|
|
34
33
|
'execution.queue.latency',
|
|
35
34
|
'execution.human.latency',
|
package/dist/consistency.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare const consistencyMetricNames: {
|
|
|
4
4
|
readonly commandInboxConflict: 'control.command_inbox.conflict.count';
|
|
5
5
|
readonly contextProviderResolution: 'context.provider_resolution.count';
|
|
6
6
|
readonly memoryWriteDecision: 'memory.write.decision.count';
|
|
7
|
-
readonly eventQuarantine: 'control.event.quarantine.count';
|
|
8
7
|
readonly executionReconciliation: 'execution.reconciliation.count';
|
|
9
8
|
readonly executionManualIntervention: 'execution.manual_intervention.count';
|
|
10
9
|
};
|
|
@@ -13,10 +12,6 @@ export interface ConsistencyMetricEmitter {
|
|
|
13
12
|
recordAcceptanceOutcome(outcome: CommandInboxAcceptanceOutcome): void;
|
|
14
13
|
recordResolution(outcome: string, reasonCategory: string): void;
|
|
15
14
|
recordApprovalDecision(decision: string): void;
|
|
16
|
-
recordQuarantine(input: {
|
|
17
|
-
readonly reason: string;
|
|
18
|
-
readonly attempted: boolean;
|
|
19
|
-
}): void;
|
|
20
15
|
recordCheckpoint(input: {
|
|
21
16
|
readonly reason: string;
|
|
22
17
|
readonly state: string;
|
package/dist/consistency.js
CHANGED
|
@@ -4,7 +4,6 @@ export const consistencyMetricNames = {
|
|
|
4
4
|
commandInboxConflict: 'control.command_inbox.conflict.count',
|
|
5
5
|
contextProviderResolution: 'context.provider_resolution.count',
|
|
6
6
|
memoryWriteDecision: 'memory.write.decision.count',
|
|
7
|
-
eventQuarantine: 'control.event.quarantine.count',
|
|
8
7
|
executionReconciliation: 'execution.reconciliation.count',
|
|
9
8
|
executionManualIntervention: 'execution.manual_intervention.count',
|
|
10
9
|
};
|
|
@@ -43,21 +42,6 @@ const unboundedLabelFallback = 'other';
|
|
|
43
42
|
function boundedLabel(value, allowed) {
|
|
44
43
|
return allowed.has(value) ? value : unboundedLabelFallback;
|
|
45
44
|
}
|
|
46
|
-
function quarantineReasonCategory(code) {
|
|
47
|
-
if (code === 'TRANSPORT_ERROR')
|
|
48
|
-
return 'transport_error';
|
|
49
|
-
if (code === 'SCHEMA_MISMATCH' || code === 'RAW_RUNTIME_PAYLOAD')
|
|
50
|
-
return 'schema_mismatch';
|
|
51
|
-
if (code === 'AUTHENTICATION_CONFIGURATION')
|
|
52
|
-
return 'auth_configuration';
|
|
53
|
-
if (/^HTTP_5\d\d$/.test(code))
|
|
54
|
-
return 'http_server';
|
|
55
|
-
if (/^HTTP_4(?:08|25|29)$/.test(code))
|
|
56
|
-
return 'http_retryable';
|
|
57
|
-
if (/^HTTP_4\d\d$/.test(code))
|
|
58
|
-
return 'http_client';
|
|
59
|
-
return unboundedLabelFallback;
|
|
60
|
-
}
|
|
61
45
|
export function createConsistencyMetricEmitter(adapter, serviceName) {
|
|
62
46
|
function add(name, labels) {
|
|
63
47
|
try {
|
|
@@ -85,12 +69,6 @@ export function createConsistencyMetricEmitter(adapter, serviceName) {
|
|
|
85
69
|
decision: boundedLabel(decision, memoryWriteDecisions),
|
|
86
70
|
});
|
|
87
71
|
},
|
|
88
|
-
recordQuarantine(input) {
|
|
89
|
-
add(consistencyMetricNames.eventQuarantine, {
|
|
90
|
-
reason_category: quarantineReasonCategory(input.reason),
|
|
91
|
-
attempted: input.attempted,
|
|
92
|
-
});
|
|
93
|
-
},
|
|
94
72
|
recordCheckpoint(input) {
|
|
95
73
|
const reason = boundedLabel(input.reason, reconciliationReasons);
|
|
96
74
|
add(consistencyMetricNames.executionReconciliation, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adea-ai/telemetry",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.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",
|
|
@@ -48,14 +48,13 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
|
-
"access": "public"
|
|
52
|
-
"provenance": true
|
|
51
|
+
"access": "public"
|
|
53
52
|
},
|
|
54
53
|
"scripts": {
|
|
55
54
|
"build": "tsc -p tsconfig.json",
|
|
56
|
-
"typecheck": "bun check -p tsconfig.json",
|
|
55
|
+
"typecheck": "bun check -p tsconfig.json && bun check -p tsconfig.test.json",
|
|
57
56
|
"lint": "oxlint src",
|
|
58
|
-
"test": "bun test src/*.test.
|
|
57
|
+
"test": "bun test src/*.test.ts src/*.test.ts"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
60
|
"@opentelemetry/api": "1.10.0",
|