@superblocksteam/telemetry 2.0.83-next.1
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/LICENSE.txt +87 -0
- package/README.md +155 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +19 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/init.d.ts +75 -0
- package/dist/browser/init.d.ts.map +1 -0
- package/dist/browser/init.js +169 -0
- package/dist/browser/init.js.map +1 -0
- package/dist/browser/resilient-exporter.d.ts +43 -0
- package/dist/browser/resilient-exporter.d.ts.map +1 -0
- package/dist/browser/resilient-exporter.js +88 -0
- package/dist/browser/resilient-exporter.js.map +1 -0
- package/dist/common/contracts/tier2-traces.d.ts +75 -0
- package/dist/common/contracts/tier2-traces.d.ts.map +1 -0
- package/dist/common/contracts/tier2-traces.js +186 -0
- package/dist/common/contracts/tier2-traces.js.map +1 -0
- package/dist/common/deployment-type.d.ts +18 -0
- package/dist/common/deployment-type.d.ts.map +1 -0
- package/dist/common/deployment-type.js +30 -0
- package/dist/common/deployment-type.js.map +1 -0
- package/dist/common/guardrails.d.ts +116 -0
- package/dist/common/guardrails.d.ts.map +1 -0
- package/dist/common/guardrails.js +189 -0
- package/dist/common/guardrails.js.map +1 -0
- package/dist/common/index.d.ts +16 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +32 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/log-sanitizer.d.ts +78 -0
- package/dist/common/log-sanitizer.d.ts.map +1 -0
- package/dist/common/log-sanitizer.js +340 -0
- package/dist/common/log-sanitizer.js.map +1 -0
- package/dist/common/policy-evaluator.d.ts +103 -0
- package/dist/common/policy-evaluator.d.ts.map +1 -0
- package/dist/common/policy-evaluator.js +200 -0
- package/dist/common/policy-evaluator.js.map +1 -0
- package/dist/common/resource.d.ts +62 -0
- package/dist/common/resource.d.ts.map +1 -0
- package/dist/common/resource.js +106 -0
- package/dist/common/resource.js.map +1 -0
- package/dist/common/tier-hints.d.ts +182 -0
- package/dist/common/tier-hints.d.ts.map +1 -0
- package/dist/common/tier-hints.js +209 -0
- package/dist/common/tier-hints.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/lint/forbidden-attributes.d.ts +149 -0
- package/dist/lint/forbidden-attributes.d.ts.map +1 -0
- package/dist/lint/forbidden-attributes.js +214 -0
- package/dist/lint/forbidden-attributes.js.map +1 -0
- package/dist/lint/index.d.ts +9 -0
- package/dist/lint/index.d.ts.map +1 -0
- package/dist/lint/index.js +16 -0
- package/dist/lint/index.js.map +1 -0
- package/dist/llmobs/index.d.ts +22 -0
- package/dist/llmobs/index.d.ts.map +1 -0
- package/dist/llmobs/index.js +29 -0
- package/dist/llmobs/index.js.map +1 -0
- package/dist/llmobs/tier1-exporter.d.ts +146 -0
- package/dist/llmobs/tier1-exporter.d.ts.map +1 -0
- package/dist/llmobs/tier1-exporter.js +196 -0
- package/dist/llmobs/tier1-exporter.js.map +1 -0
- package/dist/llmobs/tier2-summarizer.d.ts +268 -0
- package/dist/llmobs/tier2-summarizer.d.ts.map +1 -0
- package/dist/llmobs/tier2-summarizer.js +650 -0
- package/dist/llmobs/tier2-summarizer.js.map +1 -0
- package/dist/node/exporters/resilient-exporter.d.ts +77 -0
- package/dist/node/exporters/resilient-exporter.d.ts.map +1 -0
- package/dist/node/exporters/resilient-exporter.js +129 -0
- package/dist/node/exporters/resilient-exporter.js.map +1 -0
- package/dist/node/index.d.ts +11 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +24 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/init.d.ts +75 -0
- package/dist/node/init.d.ts.map +1 -0
- package/dist/node/init.js +245 -0
- package/dist/node/init.js.map +1 -0
- package/dist/node/log-processor.d.ts +83 -0
- package/dist/node/log-processor.d.ts.map +1 -0
- package/dist/node/log-processor.js +266 -0
- package/dist/node/log-processor.js.map +1 -0
- package/dist/node/metrics-client.d.ts +66 -0
- package/dist/node/metrics-client.d.ts.map +1 -0
- package/dist/node/metrics-client.js +193 -0
- package/dist/node/metrics-client.js.map +1 -0
- package/dist/node/traced-socket.d.ts +76 -0
- package/dist/node/traced-socket.d.ts.map +1 -0
- package/dist/node/traced-socket.js +261 -0
- package/dist/node/traced-socket.js.map +1 -0
- package/dist/testing/in-memory-exporter.d.ts +179 -0
- package/dist/testing/in-memory-exporter.d.ts.map +1 -0
- package/dist/testing/in-memory-exporter.js +254 -0
- package/dist/testing/in-memory-exporter.js.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +19 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/test-init.d.ts +80 -0
- package/dist/testing/test-init.d.ts.map +1 -0
- package/dist/testing/test-init.js +144 -0
- package/dist/testing/test-init.js.map +1 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +23 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/policy.d.ts +92 -0
- package/dist/types/policy.d.ts.map +1 -0
- package/dist/types/policy.js +125 -0
- package/dist/types/policy.js.map +1 -0
- package/dist-esm/browser/index.d.ts +8 -0
- package/dist-esm/browser/index.d.ts.map +1 -0
- package/dist-esm/browser/index.js +9 -0
- package/dist-esm/browser/index.js.map +1 -0
- package/dist-esm/browser/init.d.ts +75 -0
- package/dist-esm/browser/init.d.ts.map +1 -0
- package/dist-esm/browser/init.js +162 -0
- package/dist-esm/browser/init.js.map +1 -0
- package/dist-esm/browser/resilient-exporter.d.ts +43 -0
- package/dist-esm/browser/resilient-exporter.d.ts.map +1 -0
- package/dist-esm/browser/resilient-exporter.js +84 -0
- package/dist-esm/browser/resilient-exporter.js.map +1 -0
- package/dist-esm/common/contracts/tier2-traces.d.ts +75 -0
- package/dist-esm/common/contracts/tier2-traces.d.ts.map +1 -0
- package/dist-esm/common/contracts/tier2-traces.js +178 -0
- package/dist-esm/common/contracts/tier2-traces.js.map +1 -0
- package/dist-esm/common/deployment-type.d.ts +18 -0
- package/dist-esm/common/deployment-type.d.ts.map +1 -0
- package/dist-esm/common/deployment-type.js +27 -0
- package/dist-esm/common/deployment-type.js.map +1 -0
- package/dist-esm/common/guardrails.d.ts +116 -0
- package/dist-esm/common/guardrails.d.ts.map +1 -0
- package/dist-esm/common/guardrails.js +179 -0
- package/dist-esm/common/guardrails.js.map +1 -0
- package/dist-esm/common/index.d.ts +16 -0
- package/dist-esm/common/index.d.ts.map +1 -0
- package/dist-esm/common/index.js +16 -0
- package/dist-esm/common/index.js.map +1 -0
- package/dist-esm/common/log-sanitizer.d.ts +78 -0
- package/dist-esm/common/log-sanitizer.d.ts.map +1 -0
- package/dist-esm/common/log-sanitizer.js +331 -0
- package/dist-esm/common/log-sanitizer.js.map +1 -0
- package/dist-esm/common/policy-evaluator.d.ts +103 -0
- package/dist-esm/common/policy-evaluator.d.ts.map +1 -0
- package/dist-esm/common/policy-evaluator.js +196 -0
- package/dist-esm/common/policy-evaluator.js.map +1 -0
- package/dist-esm/common/resource.d.ts +62 -0
- package/dist-esm/common/resource.d.ts.map +1 -0
- package/dist-esm/common/resource.js +100 -0
- package/dist-esm/common/resource.js.map +1 -0
- package/dist-esm/common/tier-hints.d.ts +182 -0
- package/dist-esm/common/tier-hints.d.ts.map +1 -0
- package/dist-esm/common/tier-hints.js +199 -0
- package/dist-esm/common/tier-hints.js.map +1 -0
- package/dist-esm/index.d.ts +43 -0
- package/dist-esm/index.d.ts.map +1 -0
- package/dist-esm/index.js +53 -0
- package/dist-esm/index.js.map +1 -0
- package/dist-esm/lint/forbidden-attributes.d.ts +149 -0
- package/dist-esm/lint/forbidden-attributes.d.ts.map +1 -0
- package/dist-esm/lint/forbidden-attributes.js +209 -0
- package/dist-esm/lint/forbidden-attributes.js.map +1 -0
- package/dist-esm/lint/index.d.ts +9 -0
- package/dist-esm/lint/index.d.ts.map +1 -0
- package/dist-esm/lint/index.js +9 -0
- package/dist-esm/lint/index.js.map +1 -0
- package/dist-esm/llmobs/index.d.ts +22 -0
- package/dist-esm/llmobs/index.d.ts.map +1 -0
- package/dist-esm/llmobs/index.js +22 -0
- package/dist-esm/llmobs/index.js.map +1 -0
- package/dist-esm/llmobs/tier1-exporter.d.ts +146 -0
- package/dist-esm/llmobs/tier1-exporter.d.ts.map +1 -0
- package/dist-esm/llmobs/tier1-exporter.js +190 -0
- package/dist-esm/llmobs/tier1-exporter.js.map +1 -0
- package/dist-esm/llmobs/tier2-summarizer.d.ts +268 -0
- package/dist-esm/llmobs/tier2-summarizer.d.ts.map +1 -0
- package/dist-esm/llmobs/tier2-summarizer.js +646 -0
- package/dist-esm/llmobs/tier2-summarizer.js.map +1 -0
- package/dist-esm/node/exporters/resilient-exporter.d.ts +77 -0
- package/dist-esm/node/exporters/resilient-exporter.d.ts.map +1 -0
- package/dist-esm/node/exporters/resilient-exporter.js +125 -0
- package/dist-esm/node/exporters/resilient-exporter.js.map +1 -0
- package/dist-esm/node/index.d.ts +11 -0
- package/dist-esm/node/index.d.ts.map +1 -0
- package/dist-esm/node/index.js +11 -0
- package/dist-esm/node/index.js.map +1 -0
- package/dist-esm/node/init.d.ts +75 -0
- package/dist-esm/node/init.d.ts.map +1 -0
- package/dist-esm/node/init.js +239 -0
- package/dist-esm/node/init.js.map +1 -0
- package/dist-esm/node/log-processor.d.ts +83 -0
- package/dist-esm/node/log-processor.d.ts.map +1 -0
- package/dist-esm/node/log-processor.js +261 -0
- package/dist-esm/node/log-processor.js.map +1 -0
- package/dist-esm/node/metrics-client.d.ts +66 -0
- package/dist-esm/node/metrics-client.d.ts.map +1 -0
- package/dist-esm/node/metrics-client.js +189 -0
- package/dist-esm/node/metrics-client.js.map +1 -0
- package/dist-esm/node/traced-socket.d.ts +76 -0
- package/dist-esm/node/traced-socket.d.ts.map +1 -0
- package/dist-esm/node/traced-socket.js +257 -0
- package/dist-esm/node/traced-socket.js.map +1 -0
- package/dist-esm/testing/in-memory-exporter.d.ts +179 -0
- package/dist-esm/testing/in-memory-exporter.d.ts.map +1 -0
- package/dist-esm/testing/in-memory-exporter.js +248 -0
- package/dist-esm/testing/in-memory-exporter.js.map +1 -0
- package/dist-esm/testing/index.d.ts +8 -0
- package/dist-esm/testing/index.d.ts.map +1 -0
- package/dist-esm/testing/index.js +8 -0
- package/dist-esm/testing/index.js.map +1 -0
- package/dist-esm/testing/test-init.d.ts +80 -0
- package/dist-esm/testing/test-init.d.ts.map +1 -0
- package/dist-esm/testing/test-init.js +137 -0
- package/dist-esm/testing/test-init.js.map +1 -0
- package/dist-esm/types/index.d.ts +40 -0
- package/dist-esm/types/index.d.ts.map +1 -0
- package/dist-esm/types/index.js +7 -0
- package/dist-esm/types/index.js.map +1 -0
- package/dist-esm/types/policy.d.ts +92 -0
- package/dist-esm/types/policy.d.ts.map +1 -0
- package/dist-esm/types/policy.js +122 -0
- package/dist-esm/types/policy.js.map +1 -0
- package/package.json +101 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ESLint Rule: No Forbidden Telemetry Attributes
|
|
4
|
+
*
|
|
5
|
+
* This rule detects usage of forbidden attributes in span/metric instrumentation.
|
|
6
|
+
* It catches common leak paths before code is merged.
|
|
7
|
+
*
|
|
8
|
+
* Usage in eslint.config.js:
|
|
9
|
+
* ```
|
|
10
|
+
* import { noForbiddenTelemetryAttributes } from '@superblocksteam/telemetry/lint';
|
|
11
|
+
*
|
|
12
|
+
* export default [
|
|
13
|
+
* {
|
|
14
|
+
* plugins: {
|
|
15
|
+
* telemetry: { rules: { 'no-forbidden-attributes': noForbiddenTelemetryAttributes } }
|
|
16
|
+
* },
|
|
17
|
+
* rules: {
|
|
18
|
+
* 'telemetry/no-forbidden-attributes': 'error'
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* ];
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.telemetryRules = exports.noDirectOtelSdk = exports.noDirectOtelSdkMeta = exports.noForbiddenTelemetryAttributes = exports.noForbiddenTelemetryAttributesMeta = exports.FORBIDDEN_ATTRIBUTE_PATTERNS = void 0;
|
|
26
|
+
exports.noForbiddenTelemetryAttributesCreate = noForbiddenTelemetryAttributesCreate;
|
|
27
|
+
exports.noDirectOtelSdkCreate = noDirectOtelSdkCreate;
|
|
28
|
+
/* eslint-disable @typescript-eslint/no-explicit-any -- ESLint rule APIs use untyped AST nodes */
|
|
29
|
+
const tier2_traces_js_1 = require("../common/contracts/tier2-traces.js");
|
|
30
|
+
const resource_js_1 = require("../common/resource.js");
|
|
31
|
+
/**
|
|
32
|
+
* Forbidden attribute patterns for static analysis.
|
|
33
|
+
*/
|
|
34
|
+
exports.FORBIDDEN_ATTRIBUTE_PATTERNS = [
|
|
35
|
+
// Direct string literals
|
|
36
|
+
...Array.from(tier2_traces_js_1.TIER2_FORBIDDEN_ATTRIBUTES),
|
|
37
|
+
// Resource-only attributes
|
|
38
|
+
...Array.from(resource_js_1.RESOURCE_ONLY_ATTRIBUTES),
|
|
39
|
+
];
|
|
40
|
+
/**
|
|
41
|
+
* ESLint rule metadata.
|
|
42
|
+
*/
|
|
43
|
+
exports.noForbiddenTelemetryAttributesMeta = {
|
|
44
|
+
type: 'problem',
|
|
45
|
+
docs: {
|
|
46
|
+
description: 'Disallow forbidden telemetry attributes in Tier 2 paths',
|
|
47
|
+
category: 'Security',
|
|
48
|
+
recommended: true,
|
|
49
|
+
},
|
|
50
|
+
messages: {
|
|
51
|
+
forbiddenAttribute: "Attribute '{{name}}' is forbidden in Tier 2 telemetry. " +
|
|
52
|
+
'This data should only be in Tier 1 (local retention).',
|
|
53
|
+
resourceOnlyAttribute: "Attribute '{{name}}' should be a RESOURCE attribute, not a span attribute. " +
|
|
54
|
+
'Set it in initNodeTelemetry() config, not per-span.',
|
|
55
|
+
},
|
|
56
|
+
schema: [],
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* ESLint rule implementation.
|
|
60
|
+
*
|
|
61
|
+
* Detects patterns like:
|
|
62
|
+
* - span.setAttribute('prompt', value)
|
|
63
|
+
* - span.setAttributes({ prompt: value })
|
|
64
|
+
* - { 'prompt': value }
|
|
65
|
+
*/
|
|
66
|
+
function noForbiddenTelemetryAttributesCreate(context) {
|
|
67
|
+
const forbiddenSet = new Set(exports.FORBIDDEN_ATTRIBUTE_PATTERNS);
|
|
68
|
+
const resourceOnlySet = resource_js_1.RESOURCE_ONLY_ATTRIBUTES;
|
|
69
|
+
function checkAttributeName(node, name) {
|
|
70
|
+
if (tier2_traces_js_1.TIER2_FORBIDDEN_ATTRIBUTES.has(name)) {
|
|
71
|
+
context.report({
|
|
72
|
+
node,
|
|
73
|
+
messageId: 'forbiddenAttribute',
|
|
74
|
+
data: { name },
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else if (resourceOnlySet.has(name)) {
|
|
78
|
+
context.report({
|
|
79
|
+
node,
|
|
80
|
+
messageId: 'resourceOnlyAttribute',
|
|
81
|
+
data: { name },
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
// Check span.setAttribute('forbidden', value)
|
|
87
|
+
CallExpression(node) {
|
|
88
|
+
if (node.callee.type === 'MemberExpression' &&
|
|
89
|
+
node.callee.property.name === 'setAttribute' &&
|
|
90
|
+
node.arguments.length >= 1 &&
|
|
91
|
+
node.arguments[0].type === 'Literal' &&
|
|
92
|
+
typeof node.arguments[0].value === 'string') {
|
|
93
|
+
checkAttributeName(node.arguments[0], node.arguments[0].value);
|
|
94
|
+
}
|
|
95
|
+
// Check span.setAttributes({ forbidden: value })
|
|
96
|
+
if (node.callee.type === 'MemberExpression' &&
|
|
97
|
+
node.callee.property.name === 'setAttributes' &&
|
|
98
|
+
node.arguments.length >= 1 &&
|
|
99
|
+
node.arguments[0].type === 'ObjectExpression') {
|
|
100
|
+
for (const prop of node.arguments[0].properties) {
|
|
101
|
+
if (prop.key.type === 'Literal' && typeof prop.key.value === 'string') {
|
|
102
|
+
checkAttributeName(prop.key, prop.key.value);
|
|
103
|
+
}
|
|
104
|
+
else if (prop.key.type === 'Identifier') {
|
|
105
|
+
checkAttributeName(prop.key, prop.key.name);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
// Check object literals with forbidden keys in telemetry-related files
|
|
111
|
+
Property(node) {
|
|
112
|
+
// Only check if we're likely in a telemetry context
|
|
113
|
+
const filename = context.getFilename();
|
|
114
|
+
if (!filename.includes('telemetry') &&
|
|
115
|
+
!filename.includes('tracing') &&
|
|
116
|
+
!filename.includes('observability')) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
let name = null;
|
|
120
|
+
if (node.key.type === 'Literal' && typeof node.key.value === 'string') {
|
|
121
|
+
name = node.key.value;
|
|
122
|
+
}
|
|
123
|
+
else if (node.key.type === 'Identifier') {
|
|
124
|
+
name = node.key.name;
|
|
125
|
+
}
|
|
126
|
+
if (name && forbiddenSet.has(name)) {
|
|
127
|
+
checkAttributeName(node.key, name);
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Complete ESLint rule export.
|
|
134
|
+
*/
|
|
135
|
+
exports.noForbiddenTelemetryAttributes = {
|
|
136
|
+
meta: exports.noForbiddenTelemetryAttributesMeta,
|
|
137
|
+
create: noForbiddenTelemetryAttributesCreate,
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* ESLint rule: No Direct OTEL SDK Usage
|
|
141
|
+
*
|
|
142
|
+
* Detects direct usage of NodeSDK or WebTracerProvider outside the telemetry package.
|
|
143
|
+
*/
|
|
144
|
+
exports.noDirectOtelSdkMeta = {
|
|
145
|
+
type: 'problem',
|
|
146
|
+
docs: {
|
|
147
|
+
description: 'Disallow direct OpenTelemetry SDK usage outside telemetry package',
|
|
148
|
+
category: 'Best Practices',
|
|
149
|
+
recommended: true,
|
|
150
|
+
},
|
|
151
|
+
messages: {
|
|
152
|
+
directSdkUsage: "Direct usage of '{{name}}' is not allowed. " +
|
|
153
|
+
'Use @superblocksteam/telemetry bootstrap functions instead.',
|
|
154
|
+
},
|
|
155
|
+
schema: [],
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* Forbidden OTEL SDK imports.
|
|
159
|
+
*/
|
|
160
|
+
const FORBIDDEN_SDK_IMPORTS = [
|
|
161
|
+
'NodeSDK',
|
|
162
|
+
'WebTracerProvider',
|
|
163
|
+
'NodeTracerProvider',
|
|
164
|
+
'BasicTracerProvider',
|
|
165
|
+
];
|
|
166
|
+
function noDirectOtelSdkCreate(context) {
|
|
167
|
+
const filename = context.getFilename();
|
|
168
|
+
// Allow in telemetry package itself
|
|
169
|
+
if (filename.includes('packages/telemetry')) {
|
|
170
|
+
return {};
|
|
171
|
+
}
|
|
172
|
+
return {
|
|
173
|
+
ImportSpecifier(node) {
|
|
174
|
+
const importedName = node.imported.name;
|
|
175
|
+
if (FORBIDDEN_SDK_IMPORTS.includes(importedName)) {
|
|
176
|
+
context.report({
|
|
177
|
+
node,
|
|
178
|
+
messageId: 'directSdkUsage',
|
|
179
|
+
data: { name: importedName },
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
// Also check require() calls
|
|
184
|
+
CallExpression(node) {
|
|
185
|
+
if (node.callee.name === 'require' &&
|
|
186
|
+
node.arguments.length === 1 &&
|
|
187
|
+
node.arguments[0].type === 'Literal') {
|
|
188
|
+
const requirePath = node.arguments[0].value;
|
|
189
|
+
if (typeof requirePath === 'string' &&
|
|
190
|
+
(requirePath.includes('@opentelemetry/sdk-node') ||
|
|
191
|
+
requirePath.includes('@opentelemetry/sdk-trace-node') ||
|
|
192
|
+
requirePath.includes('@opentelemetry/sdk-trace-web'))) {
|
|
193
|
+
context.report({
|
|
194
|
+
node,
|
|
195
|
+
messageId: 'directSdkUsage',
|
|
196
|
+
data: { name: requirePath },
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
exports.noDirectOtelSdk = {
|
|
204
|
+
meta: exports.noDirectOtelSdkMeta,
|
|
205
|
+
create: noDirectOtelSdkCreate,
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* All telemetry ESLint rules.
|
|
209
|
+
*/
|
|
210
|
+
exports.telemetryRules = {
|
|
211
|
+
'no-forbidden-attributes': exports.noForbiddenTelemetryAttributes,
|
|
212
|
+
'no-direct-otel-sdk': exports.noDirectOtelSdk,
|
|
213
|
+
};
|
|
214
|
+
//# sourceMappingURL=forbidden-attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden-attributes.js","sourceRoot":"","sources":["../../src/lint/forbidden-attributes.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AA8CH,oFA0EC;AAwCD,sDA2CC;AAzMD,iGAAiG;AAEjG,yEAAiF;AACjF,uDAAiE;AAEjE;;GAEG;AACU,QAAA,4BAA4B,GAAG;IAC1C,yBAAyB;IACzB,GAAG,KAAK,CAAC,IAAI,CAAC,4CAA0B,CAAC;IACzC,2BAA2B;IAC3B,GAAG,KAAK,CAAC,IAAI,CAAC,sCAAwB,CAAC;CACxC,CAAC;AAEF;;GAEG;AACU,QAAA,kCAAkC,GAAG;IAChD,IAAI,EAAE,SAAS;IACf,IAAI,EAAE;QACJ,WAAW,EAAE,yDAAyD;QACtE,QAAQ,EAAE,UAAU;QACpB,WAAW,EAAE,IAAI;KAClB;IACD,QAAQ,EAAE;QACR,kBAAkB,EAChB,yDAAyD;YACzD,uDAAuD;QACzD,qBAAqB,EACnB,6EAA6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,SAAS,EAAE,gBAAgB;oBAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;iBAC7B,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,6BAA6B;QAC7B,cAAc,CAAC,IAAS;YACtB,IACE,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;gBAC9B,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,EACpC,CAAC;gBACD,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAC5C,IACE,OAAO,WAAW,KAAK,QAAQ;oBAC/B,CAAC,WAAW,CAAC,QAAQ,CAAC,yBAAyB,CAAC;wBAC9C,WAAW,CAAC,QAAQ,CAAC,+BAA+B,CAAC;wBACrD,WAAW,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC,EACvD,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,gBAAgB;wBAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;qBAC5B,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAEY,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,2BAAmB;IACzB,MAAM,EAAE,qBAAqB;CAC9B,CAAC;AAEF;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,yBAAyB,EAAE,sCAA8B;IACzD,oBAAoB,EAAE,uBAAe;CACtC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telemetry ESLint Rules
|
|
3
|
+
*
|
|
4
|
+
* Lint rules for enforcing telemetry best practices:
|
|
5
|
+
* - no-forbidden-attributes: Prevents Tier 1 data in Tier 2 paths
|
|
6
|
+
* - no-direct-otel-sdk: Enforces use of telemetry bootstrap
|
|
7
|
+
*/
|
|
8
|
+
export { noForbiddenTelemetryAttributes, noDirectOtelSdk, telemetryRules, FORBIDDEN_ATTRIBUTE_PATTERNS, } from './forbidden-attributes.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,8BAA8B,EAC9B,eAAe,EACf,cAAc,EACd,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Telemetry ESLint Rules
|
|
4
|
+
*
|
|
5
|
+
* Lint rules for enforcing telemetry best practices:
|
|
6
|
+
* - no-forbidden-attributes: Prevents Tier 1 data in Tier 2 paths
|
|
7
|
+
* - no-direct-otel-sdk: Enforces use of telemetry bootstrap
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.FORBIDDEN_ATTRIBUTE_PATTERNS = exports.telemetryRules = exports.noDirectOtelSdk = exports.noForbiddenTelemetryAttributes = void 0;
|
|
11
|
+
var forbidden_attributes_js_1 = require("./forbidden-attributes.js");
|
|
12
|
+
Object.defineProperty(exports, "noForbiddenTelemetryAttributes", { enumerable: true, get: function () { return forbidden_attributes_js_1.noForbiddenTelemetryAttributes; } });
|
|
13
|
+
Object.defineProperty(exports, "noDirectOtelSdk", { enumerable: true, get: function () { return forbidden_attributes_js_1.noDirectOtelSdk; } });
|
|
14
|
+
Object.defineProperty(exports, "telemetryRules", { enumerable: true, get: function () { return forbidden_attributes_js_1.telemetryRules; } });
|
|
15
|
+
Object.defineProperty(exports, "FORBIDDEN_ATTRIBUTE_PATTERNS", { enumerable: true, get: function () { return forbidden_attributes_js_1.FORBIDDEN_ATTRIBUTE_PATTERNS; } });
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lint/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,qEAKmC;AAJjC,yIAAA,8BAA8B,OAAA;AAC9B,0HAAA,eAAe,OAAA;AACf,yHAAA,cAAc,OAAA;AACd,uIAAA,4BAA4B,OAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LLMObs Tiered Telemetry
|
|
3
|
+
*
|
|
4
|
+
* This module provides tiered telemetry for LLMObs (LLM Observability) data:
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import {
|
|
9
|
+
* createTier1LLMObsExporter,
|
|
10
|
+
* LLMObsTier2Summarizer,
|
|
11
|
+
* } from '@superblocksteam/telemetry/llmobs';
|
|
12
|
+
*
|
|
13
|
+
* // Tier 1: Local storage
|
|
14
|
+
* const { exporter, store } = createTier1LLMObsExporter();
|
|
15
|
+
*
|
|
16
|
+
* // Tier 2: Summarize for OTEL-aligned metrics
|
|
17
|
+
* const summarizer = new LLMObsTier2Summarizer(metricsClient);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export { Tier1LLMObsExporter, InMemoryLLMObsStore, createTier1LLMObsExporter, type LLMObsLocalStore, } from './tier1-exporter.js';
|
|
21
|
+
export { LLMObsTier2Summarizer, type LLMSpanSummary, type ToolSpanSummary, type LLMErrorCategory, type LLMFinishReason, type LLMProvider, type LLMRequestMetricLabels, type TokenMetricLabels, type ToolCallMetricLabels, type Tier2MetricsClient, } from './tier2-summarizer.js';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/llmobs/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,gBAAgB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,qBAAqB,EACrB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* LLMObs Tiered Telemetry
|
|
4
|
+
*
|
|
5
|
+
* This module provides tiered telemetry for LLMObs (LLM Observability) data:
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import {
|
|
10
|
+
* createTier1LLMObsExporter,
|
|
11
|
+
* LLMObsTier2Summarizer,
|
|
12
|
+
* } from '@superblocksteam/telemetry/llmobs';
|
|
13
|
+
*
|
|
14
|
+
* // Tier 1: Local storage
|
|
15
|
+
* const { exporter, store } = createTier1LLMObsExporter();
|
|
16
|
+
*
|
|
17
|
+
* // Tier 2: Summarize for OTEL-aligned metrics
|
|
18
|
+
* const summarizer = new LLMObsTier2Summarizer(metricsClient);
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.LLMObsTier2Summarizer = exports.createTier1LLMObsExporter = exports.InMemoryLLMObsStore = exports.Tier1LLMObsExporter = void 0;
|
|
23
|
+
var tier1_exporter_js_1 = require("./tier1-exporter.js");
|
|
24
|
+
Object.defineProperty(exports, "Tier1LLMObsExporter", { enumerable: true, get: function () { return tier1_exporter_js_1.Tier1LLMObsExporter; } });
|
|
25
|
+
Object.defineProperty(exports, "InMemoryLLMObsStore", { enumerable: true, get: function () { return tier1_exporter_js_1.InMemoryLLMObsStore; } });
|
|
26
|
+
Object.defineProperty(exports, "createTier1LLMObsExporter", { enumerable: true, get: function () { return tier1_exporter_js_1.createTier1LLMObsExporter; } });
|
|
27
|
+
var tier2_summarizer_js_1 = require("./tier2-summarizer.js");
|
|
28
|
+
Object.defineProperty(exports, "LLMObsTier2Summarizer", { enumerable: true, get: function () { return tier2_summarizer_js_1.LLMObsTier2Summarizer; } });
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/llmobs/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;GAkBG;;;AAEH,yDAK6B;AAJ3B,wHAAA,mBAAmB,OAAA;AACnB,wHAAA,mBAAmB,OAAA;AACnB,8HAAA,yBAAyB,OAAA;AAI3B,6DAW+B;AAV7B,4HAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tier 1 LLMObs Exporter
|
|
3
|
+
*
|
|
4
|
+
* Stores full-fidelity LLMObs spans locally for debugging.
|
|
5
|
+
* These spans contain prompts, code, tool IO - NEVER exported for cloud-prem.
|
|
6
|
+
*
|
|
7
|
+
* For cloud deployments, Tier 1 data can be exported (same trust boundary).
|
|
8
|
+
* For cloud-prem deployments, Tier 1 data stays local only.
|
|
9
|
+
*/
|
|
10
|
+
import type { SpanExporter, ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
11
|
+
import type { ExportResult } from '@opentelemetry/core';
|
|
12
|
+
/**
|
|
13
|
+
* Storage interface for Tier 1 LLMObs spans.
|
|
14
|
+
*
|
|
15
|
+
* Provides queryable access for local debugging.
|
|
16
|
+
* Implementation can be in-memory, filesystem, or local database.
|
|
17
|
+
*/
|
|
18
|
+
export interface LLMObsLocalStore {
|
|
19
|
+
/**
|
|
20
|
+
* Store a span for later retrieval.
|
|
21
|
+
*
|
|
22
|
+
* @param span - The span to store
|
|
23
|
+
*/
|
|
24
|
+
store(span: ReadableSpan): void;
|
|
25
|
+
/**
|
|
26
|
+
* Query spans by session ID.
|
|
27
|
+
*
|
|
28
|
+
* @param sessionId - Session ID to query
|
|
29
|
+
* @returns Matching spans
|
|
30
|
+
*/
|
|
31
|
+
query(sessionId: string): ReadableSpan[];
|
|
32
|
+
/**
|
|
33
|
+
* Clear all stored spans.
|
|
34
|
+
*/
|
|
35
|
+
clear(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get the count of stored spans.
|
|
38
|
+
*/
|
|
39
|
+
size(): number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* In-memory implementation of LLMObsLocalStore.
|
|
43
|
+
*
|
|
44
|
+
* Suitable for development and short-lived processes.
|
|
45
|
+
* Spans are automatically evicted when limits are reached.
|
|
46
|
+
*/
|
|
47
|
+
export declare class InMemoryLLMObsStore implements LLMObsLocalStore {
|
|
48
|
+
private readonly spans;
|
|
49
|
+
private readonly maxSpansPerSession;
|
|
50
|
+
private readonly maxSessions;
|
|
51
|
+
private totalSpanCount;
|
|
52
|
+
/**
|
|
53
|
+
* Create an in-memory LLMObs store.
|
|
54
|
+
*
|
|
55
|
+
* @param options - Configuration options
|
|
56
|
+
* @param options.maxSpansPerSession - Maximum spans to retain per session (default: 1000)
|
|
57
|
+
* @param options.maxSessions - Maximum sessions to retain (default: 100)
|
|
58
|
+
*/
|
|
59
|
+
constructor(options?: {
|
|
60
|
+
maxSpansPerSession?: number;
|
|
61
|
+
maxSessions?: number;
|
|
62
|
+
});
|
|
63
|
+
store(span: ReadableSpan): void;
|
|
64
|
+
query(sessionId: string): ReadableSpan[];
|
|
65
|
+
clear(): void;
|
|
66
|
+
size(): number;
|
|
67
|
+
/**
|
|
68
|
+
* Get all session IDs.
|
|
69
|
+
*
|
|
70
|
+
* @returns Array of session IDs
|
|
71
|
+
*/
|
|
72
|
+
getSessions(): string[];
|
|
73
|
+
/**
|
|
74
|
+
* Extract session ID from span attributes.
|
|
75
|
+
*/
|
|
76
|
+
private getSessionId;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Tier 1 LLMObs Exporter.
|
|
80
|
+
*
|
|
81
|
+
* Exports LLMObs spans to local storage only.
|
|
82
|
+
* These spans contain full fidelity debugging data (prompts, code, tool IO).
|
|
83
|
+
* NEVER exported to external backends in cloud-prem deployments.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* const store = new InMemoryLLMObsStore();
|
|
88
|
+
* const exporter = new Tier1LLMObsExporter(store);
|
|
89
|
+
*
|
|
90
|
+
* // Later, query for debugging
|
|
91
|
+
* const spans = store.query(sessionId);
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare class Tier1LLMObsExporter implements SpanExporter {
|
|
95
|
+
private readonly localStore;
|
|
96
|
+
private readonly debugLogging;
|
|
97
|
+
private isShutdown;
|
|
98
|
+
/**
|
|
99
|
+
* Create a Tier 1 LLMObs exporter.
|
|
100
|
+
*
|
|
101
|
+
* @param localStore - Storage for local spans
|
|
102
|
+
* @param options - Configuration options
|
|
103
|
+
* @param options.debugLogging - Enable debug logging (default: false)
|
|
104
|
+
*/
|
|
105
|
+
constructor(localStore: LLMObsLocalStore, options?: {
|
|
106
|
+
debugLogging?: boolean;
|
|
107
|
+
});
|
|
108
|
+
/**
|
|
109
|
+
* Export spans to local storage.
|
|
110
|
+
*
|
|
111
|
+
* @param spans - Spans to export
|
|
112
|
+
* @param resultCallback - Callback with export result
|
|
113
|
+
*/
|
|
114
|
+
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
|
|
115
|
+
/**
|
|
116
|
+
* Shutdown the exporter.
|
|
117
|
+
*/
|
|
118
|
+
shutdown(): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Force flush (no-op for local storage).
|
|
121
|
+
*/
|
|
122
|
+
forceFlush(): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* Check if a span is an LLMObs span.
|
|
125
|
+
*/
|
|
126
|
+
private isLLMObsSpan;
|
|
127
|
+
/**
|
|
128
|
+
* Get span duration in milliseconds.
|
|
129
|
+
*/
|
|
130
|
+
private getDurationMs;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Create a Tier 1 LLMObs exporter with in-memory storage.
|
|
134
|
+
*
|
|
135
|
+
* @param options - Configuration options
|
|
136
|
+
* @returns Exporter and store instances
|
|
137
|
+
*/
|
|
138
|
+
export declare function createTier1LLMObsExporter(options?: {
|
|
139
|
+
maxSpansPerSession?: number;
|
|
140
|
+
maxSessions?: number;
|
|
141
|
+
debugLogging?: boolean;
|
|
142
|
+
}): {
|
|
143
|
+
exporter: Tier1LLMObsExporter;
|
|
144
|
+
store: InMemoryLLMObsStore;
|
|
145
|
+
};
|
|
146
|
+
//# sourceMappingURL=tier1-exporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier1-exporter.d.ts","sourceRoot":"","sources":["../../src/llmobs/tier1-exporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,KAAK,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAEhC;;;;;OAKG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,EAAE,CAAC;IAEzC;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;OAEG;IACH,IAAI,IAAI,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,YAAW,gBAAgB;IAC1D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA0C;IAChE,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA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AE,QAAQ,EAAE,mBAAmB,CAAC;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAE,CAShE"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Tier 1 LLMObs Exporter
|
|
4
|
+
*
|
|
5
|
+
* Stores full-fidelity LLMObs spans locally for debugging.
|
|
6
|
+
* These spans contain prompts, code, tool IO - NEVER exported for cloud-prem.
|
|
7
|
+
*
|
|
8
|
+
* For cloud deployments, Tier 1 data can be exported (same trust boundary).
|
|
9
|
+
* For cloud-prem deployments, Tier 1 data stays local only.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Tier1LLMObsExporter = exports.InMemoryLLMObsStore = void 0;
|
|
13
|
+
exports.createTier1LLMObsExporter = createTier1LLMObsExporter;
|
|
14
|
+
const core_1 = require("@opentelemetry/core");
|
|
15
|
+
/**
|
|
16
|
+
* In-memory implementation of LLMObsLocalStore.
|
|
17
|
+
*
|
|
18
|
+
* Suitable for development and short-lived processes.
|
|
19
|
+
* Spans are automatically evicted when limits are reached.
|
|
20
|
+
*/
|
|
21
|
+
class InMemoryLLMObsStore {
|
|
22
|
+
spans = new Map();
|
|
23
|
+
maxSpansPerSession;
|
|
24
|
+
maxSessions;
|
|
25
|
+
totalSpanCount = 0;
|
|
26
|
+
/**
|
|
27
|
+
* Create an in-memory LLMObs store.
|
|
28
|
+
*
|
|
29
|
+
* @param options - Configuration options
|
|
30
|
+
* @param options.maxSpansPerSession - Maximum spans to retain per session (default: 1000)
|
|
31
|
+
* @param options.maxSessions - Maximum sessions to retain (default: 100)
|
|
32
|
+
*/
|
|
33
|
+
constructor(options = {}) {
|
|
34
|
+
this.maxSpansPerSession = options.maxSpansPerSession ?? 1000;
|
|
35
|
+
this.maxSessions = options.maxSessions ?? 100;
|
|
36
|
+
}
|
|
37
|
+
store(span) {
|
|
38
|
+
const sessionId = this.getSessionId(span) || 'default';
|
|
39
|
+
// Create session if doesn't exist
|
|
40
|
+
if (!this.spans.has(sessionId)) {
|
|
41
|
+
// Evict oldest session if at capacity
|
|
42
|
+
if (this.spans.size >= this.maxSessions) {
|
|
43
|
+
const oldestSession = this.spans.keys().next().value;
|
|
44
|
+
if (oldestSession) {
|
|
45
|
+
const evictedSpans = this.spans.get(oldestSession)?.length ?? 0;
|
|
46
|
+
this.totalSpanCount -= evictedSpans;
|
|
47
|
+
this.spans.delete(oldestSession);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
this.spans.set(sessionId, []);
|
|
51
|
+
}
|
|
52
|
+
const sessionSpans = this.spans.get(sessionId);
|
|
53
|
+
sessionSpans.push(span);
|
|
54
|
+
this.totalSpanCount++;
|
|
55
|
+
// Evict oldest spans in session if at capacity
|
|
56
|
+
if (sessionSpans.length > this.maxSpansPerSession) {
|
|
57
|
+
sessionSpans.shift();
|
|
58
|
+
this.totalSpanCount--;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
query(sessionId) {
|
|
62
|
+
return this.spans.get(sessionId) ?? [];
|
|
63
|
+
}
|
|
64
|
+
clear() {
|
|
65
|
+
this.spans.clear();
|
|
66
|
+
this.totalSpanCount = 0;
|
|
67
|
+
}
|
|
68
|
+
size() {
|
|
69
|
+
return this.totalSpanCount;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get all session IDs.
|
|
73
|
+
*
|
|
74
|
+
* @returns Array of session IDs
|
|
75
|
+
*/
|
|
76
|
+
getSessions() {
|
|
77
|
+
return Array.from(this.spans.keys());
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Extract session ID from span attributes.
|
|
81
|
+
*/
|
|
82
|
+
getSessionId(span) {
|
|
83
|
+
return (span.attributes['llmobs.session_id'] ||
|
|
84
|
+
span.attributes['session.id'] ||
|
|
85
|
+
span.attributes['session_id']);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.InMemoryLLMObsStore = InMemoryLLMObsStore;
|
|
89
|
+
/**
|
|
90
|
+
* Tier 1 LLMObs Exporter.
|
|
91
|
+
*
|
|
92
|
+
* Exports LLMObs spans to local storage only.
|
|
93
|
+
* These spans contain full fidelity debugging data (prompts, code, tool IO).
|
|
94
|
+
* NEVER exported to external backends in cloud-prem deployments.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const store = new InMemoryLLMObsStore();
|
|
99
|
+
* const exporter = new Tier1LLMObsExporter(store);
|
|
100
|
+
*
|
|
101
|
+
* // Later, query for debugging
|
|
102
|
+
* const spans = store.query(sessionId);
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
class Tier1LLMObsExporter {
|
|
106
|
+
localStore;
|
|
107
|
+
debugLogging;
|
|
108
|
+
isShutdown = false;
|
|
109
|
+
/**
|
|
110
|
+
* Create a Tier 1 LLMObs exporter.
|
|
111
|
+
*
|
|
112
|
+
* @param localStore - Storage for local spans
|
|
113
|
+
* @param options - Configuration options
|
|
114
|
+
* @param options.debugLogging - Enable debug logging (default: false)
|
|
115
|
+
*/
|
|
116
|
+
constructor(localStore, options = {}) {
|
|
117
|
+
this.localStore = localStore;
|
|
118
|
+
this.debugLogging = options.debugLogging ?? false;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Export spans to local storage.
|
|
122
|
+
*
|
|
123
|
+
* @param spans - Spans to export
|
|
124
|
+
* @param resultCallback - Callback with export result
|
|
125
|
+
*/
|
|
126
|
+
export(spans, resultCallback) {
|
|
127
|
+
if (this.isShutdown) {
|
|
128
|
+
resultCallback({ code: core_1.ExportResultCode.FAILED, error: new Error('Exporter is shutdown') });
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
for (const span of spans) {
|
|
132
|
+
// Only store LLMObs-related spans
|
|
133
|
+
if (this.isLLMObsSpan(span)) {
|
|
134
|
+
this.localStore.store(span);
|
|
135
|
+
if (this.debugLogging) {
|
|
136
|
+
console.debug('[LLMObs Tier 1]', span.name, {
|
|
137
|
+
traceId: span.spanContext().traceId,
|
|
138
|
+
duration: this.getDurationMs(span),
|
|
139
|
+
hasInput: !!span.attributes['llmobs.input'],
|
|
140
|
+
hasOutput: !!span.attributes['llmobs.output'],
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
resultCallback({ code: core_1.ExportResultCode.SUCCESS });
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Shutdown the exporter.
|
|
149
|
+
*/
|
|
150
|
+
async shutdown() {
|
|
151
|
+
this.isShutdown = true;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Force flush (no-op for local storage).
|
|
155
|
+
*/
|
|
156
|
+
async forceFlush() {
|
|
157
|
+
// No-op for local storage
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Check if a span is an LLMObs span.
|
|
161
|
+
*/
|
|
162
|
+
isLLMObsSpan(span) {
|
|
163
|
+
return (span.name.startsWith('ai.') ||
|
|
164
|
+
span.name.startsWith('llmobs.') ||
|
|
165
|
+
span.name.startsWith('llm.') ||
|
|
166
|
+
span.name.startsWith('tool.') ||
|
|
167
|
+
span.name.startsWith('clark.') ||
|
|
168
|
+
!!span.attributes['llmobs.span_kind']);
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get span duration in milliseconds.
|
|
172
|
+
*/
|
|
173
|
+
getDurationMs(span) {
|
|
174
|
+
const [startSecs, startNanos] = span.startTime;
|
|
175
|
+
const [endSecs, endNanos] = span.endTime;
|
|
176
|
+
return (endSecs - startSecs) * 1000 + (endNanos - startNanos) / 1e6;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
exports.Tier1LLMObsExporter = Tier1LLMObsExporter;
|
|
180
|
+
/**
|
|
181
|
+
* Create a Tier 1 LLMObs exporter with in-memory storage.
|
|
182
|
+
*
|
|
183
|
+
* @param options - Configuration options
|
|
184
|
+
* @returns Exporter and store instances
|
|
185
|
+
*/
|
|
186
|
+
function createTier1LLMObsExporter(options) {
|
|
187
|
+
const store = new InMemoryLLMObsStore({
|
|
188
|
+
maxSpansPerSession: options?.maxSpansPerSession,
|
|
189
|
+
maxSessions: options?.maxSessions,
|
|
190
|
+
});
|
|
191
|
+
const exporter = new Tier1LLMObsExporter(store, {
|
|
192
|
+
debugLogging: options?.debugLogging,
|
|
193
|
+
});
|
|
194
|
+
return { exporter, store };
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=tier1-exporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tier1-exporter.js","sourceRoot":"","sources":["../../src/llmobs/tier1-exporter.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA+OH,8DAaC;AAxPD,8CAAuD;AAmCvD;;;;;GAKG;AACH,MAAa,mBAAmB;IACb,KAAK,GAAgC,IAAI,GAAG,EAAE,CAAC;IAC/C,kBAAkB,CAAS;IAC3B,WAAW,CAAS;IAC7B,cAAc,GAAG,CAAC,CAAC;IAE3B;;;;;;OAMG;IACH,YAAY,UAAiE,EAAE;QAC7E,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,IAAI,IAAI,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,GAAG,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,IAAkB;QACtB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC;QAEvD,kCAAkC;QAClC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAC/B,sCAAsC;YACtC,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;gBACxC,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,IAA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