@brizz/sdk 0.1.27 → 0.1.28
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/README.md +39 -1
- package/dist/index.cjs +304 -215
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +300 -215
- package/dist/preload.cjs +15 -9
- package/dist/preload.js +15 -9
- package/package.json +41 -41
package/dist/preload.js
CHANGED
|
@@ -455,6 +455,7 @@ var SESSION_ID = "session.id";
|
|
|
455
455
|
var PROPERTIES_CONTEXT_KEY = createContextKey(PROPERTIES);
|
|
456
456
|
var SESSION_OBJECT_CONTEXT_KEY = createContextKey("brizz.session.object");
|
|
457
457
|
var INTERRUPT_TOOLS = "brizz.internal.interrupt";
|
|
458
|
+
var INTERNAL_EVENT_PREFIX = "brizz.internal.";
|
|
458
459
|
|
|
459
460
|
// src/internal/instrumentation/mcp/session.ts
|
|
460
461
|
function stampAndPropagateSession(span, sessionId, baseContext = context.active()) {
|
|
@@ -892,7 +893,7 @@ function safeEnd(span) {
|
|
|
892
893
|
|
|
893
894
|
// src/internal/version.ts
|
|
894
895
|
function getSDKVersion() {
|
|
895
|
-
return "0.1.
|
|
896
|
+
return "0.1.28";
|
|
896
897
|
}
|
|
897
898
|
|
|
898
899
|
// src/internal/instrumentation/mcp/version.ts
|
|
@@ -1196,8 +1197,11 @@ import {
|
|
|
1196
1197
|
LoggerProvider
|
|
1197
1198
|
} from "@opentelemetry/sdk-logs";
|
|
1198
1199
|
|
|
1200
|
+
// src/internal/trace/session.ts
|
|
1201
|
+
import { context as context3, trace as trace4, SpanStatusCode as SpanStatusCode3 } from "@opentelemetry/api";
|
|
1202
|
+
|
|
1199
1203
|
// src/internal/log/processors/log-processor.ts
|
|
1200
|
-
import { context as
|
|
1204
|
+
import { context as context4 } from "@opentelemetry/api";
|
|
1201
1205
|
import { BatchLogRecordProcessor, SimpleLogRecordProcessor } from "@opentelemetry/sdk-logs";
|
|
1202
1206
|
|
|
1203
1207
|
// src/internal/masking/patterns.ts
|
|
@@ -1626,7 +1630,7 @@ var BrizzSimpleLogRecordProcessor = class extends SimpleLogRecordProcessor {
|
|
|
1626
1630
|
if (maskingConfig) {
|
|
1627
1631
|
maskLog(logRecord, maskingConfig);
|
|
1628
1632
|
}
|
|
1629
|
-
const associationProperties =
|
|
1633
|
+
const associationProperties = context4.active().getValue(PROPERTIES_CONTEXT_KEY);
|
|
1630
1634
|
if (associationProperties) {
|
|
1631
1635
|
for (const [key, value] of Object.entries(associationProperties)) {
|
|
1632
1636
|
logRecord.setAttribute(`${BRIZZ}.${key}`, value);
|
|
@@ -1646,7 +1650,7 @@ var BrizzBatchLogRecordProcessor = class extends BatchLogRecordProcessor {
|
|
|
1646
1650
|
if (maskingConfig) {
|
|
1647
1651
|
maskLog(logRecord, maskingConfig);
|
|
1648
1652
|
}
|
|
1649
|
-
const associationProperties =
|
|
1653
|
+
const associationProperties = context4.active().getValue(PROPERTIES_CONTEXT_KEY);
|
|
1650
1654
|
if (associationProperties) {
|
|
1651
1655
|
for (const [key, value] of Object.entries(associationProperties)) {
|
|
1652
1656
|
logRecord.setAttribute(`${BRIZZ}.${key}`, value);
|
|
@@ -1675,6 +1679,11 @@ function maskLog(logRecord, config) {
|
|
|
1675
1679
|
for (const [key, value] of Object.entries(maskedAttributes)) {
|
|
1676
1680
|
newAttributes[key] = value;
|
|
1677
1681
|
}
|
|
1682
|
+
for (const [key, value] of Object.entries(logRecord.attributes)) {
|
|
1683
|
+
if (key.startsWith(INTERNAL_EVENT_PREFIX)) {
|
|
1684
|
+
newAttributes[key] = value;
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1678
1687
|
logRecord.setAttributes(newAttributes);
|
|
1679
1688
|
}
|
|
1680
1689
|
}
|
|
@@ -2033,13 +2042,13 @@ var BrizzSpanExporter = class {
|
|
|
2033
2042
|
};
|
|
2034
2043
|
|
|
2035
2044
|
// src/internal/trace/processors/span-processor.ts
|
|
2036
|
-
import { context as
|
|
2045
|
+
import { context as context5 } from "@opentelemetry/api";
|
|
2037
2046
|
import {
|
|
2038
2047
|
BatchSpanProcessor,
|
|
2039
2048
|
SimpleSpanProcessor
|
|
2040
2049
|
} from "@opentelemetry/sdk-trace-base";
|
|
2041
2050
|
function applyContextAttributes(span) {
|
|
2042
|
-
const sessionProperties =
|
|
2051
|
+
const sessionProperties = context5.active().getValue(PROPERTIES_CONTEXT_KEY);
|
|
2043
2052
|
if (sessionProperties) {
|
|
2044
2053
|
for (const [key, value] of Object.entries(sessionProperties)) {
|
|
2045
2054
|
span.setAttribute(`${BRIZZ}.${key}`, value);
|
|
@@ -2221,9 +2230,6 @@ function getSpanProcessor() {
|
|
|
2221
2230
|
return TracingModule.getInstance().getSpanProcessor();
|
|
2222
2231
|
}
|
|
2223
2232
|
|
|
2224
|
-
// src/internal/trace/session.ts
|
|
2225
|
-
import { context as context5, trace as trace4, SpanStatusCode as SpanStatusCode3 } from "@opentelemetry/api";
|
|
2226
|
-
|
|
2227
2233
|
// src/internal/sdk.ts
|
|
2228
2234
|
var _Brizz = class __Brizz {
|
|
2229
2235
|
static instance = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brizz/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenTelemetry-based observability SDK for AI applications",
|
|
6
6
|
"keywords": [
|
|
@@ -85,32 +85,32 @@
|
|
|
85
85
|
"registry": "https://registry.npmjs.org/"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@ai-sdk/anthropic": "^3.0.
|
|
89
|
-
"@ai-sdk/openai": "^3.0.
|
|
88
|
+
"@ai-sdk/anthropic": "^3.0.81",
|
|
89
|
+
"@ai-sdk/openai": "^3.0.68",
|
|
90
90
|
"@arizeai/openinference-instrumentation-mcp": "^0.2.14",
|
|
91
|
-
"@changesets/changelog-github": "^0.
|
|
91
|
+
"@changesets/changelog-github": "^0.7.0",
|
|
92
92
|
"@changesets/cli": "^2.30.0",
|
|
93
93
|
"@eslint/js": "^10.0.1",
|
|
94
94
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
95
95
|
"@types/jest": "^30.0.0",
|
|
96
|
-
"@types/node": "^25.
|
|
97
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
98
|
-
"@typescript-eslint/parser": "^8.
|
|
99
|
-
"ai": "^6.0.
|
|
100
|
-
"eslint": "^10.1
|
|
96
|
+
"@types/node": "^25.9.2",
|
|
97
|
+
"@typescript-eslint/eslint-plugin": "^8.60.1",
|
|
98
|
+
"@typescript-eslint/parser": "^8.60.1",
|
|
99
|
+
"ai": "^6.0.197",
|
|
100
|
+
"eslint": "^10.4.1",
|
|
101
101
|
"eslint-config-prettier": "^10.1.8",
|
|
102
102
|
"eslint-plugin-import": "^2.32.0",
|
|
103
|
-
"eslint-plugin-promise": "^7.
|
|
104
|
-
"eslint-plugin-unicorn": "^
|
|
105
|
-
"jest": "^30.
|
|
106
|
-
"jest-environment-jsdom": "^30.
|
|
107
|
-
"openai": "^6.
|
|
103
|
+
"eslint-plugin-promise": "^7.3.0",
|
|
104
|
+
"eslint-plugin-unicorn": "^65.0.0",
|
|
105
|
+
"jest": "^30.4.2",
|
|
106
|
+
"jest-environment-jsdom": "^30.4.1",
|
|
107
|
+
"openai": "^6.42.0",
|
|
108
108
|
"prettier": "^3.8.1",
|
|
109
|
-
"ts-jest": "^29.4.
|
|
109
|
+
"ts-jest": "^29.4.11",
|
|
110
110
|
"tsup": "^8.5.1",
|
|
111
|
-
"typescript": "^
|
|
112
|
-
"vitest": "^4.1.
|
|
113
|
-
"zod": "^4.3
|
|
111
|
+
"typescript": "^6.0.3",
|
|
112
|
+
"vitest": "^4.1.8",
|
|
113
|
+
"zod": "^4.4.3"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
116
|
"@langchain/core": "^0.3.0 || ^1.0.0",
|
|
@@ -129,36 +129,36 @@
|
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
"dependencies": {
|
|
132
|
-
"@arizeai/openinference-instrumentation-langchain": "^4.0.
|
|
133
|
-
"@arizeai/openinference-instrumentation-mcp": "^0.2.
|
|
132
|
+
"@arizeai/openinference-instrumentation-langchain": "^4.0.12",
|
|
133
|
+
"@arizeai/openinference-instrumentation-mcp": "^0.2.18",
|
|
134
134
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
135
135
|
"@opentelemetry/api": "^1.9.0",
|
|
136
|
-
"@opentelemetry/api-logs": "^0.
|
|
137
|
-
"@opentelemetry/auto-instrumentations-node": "^0.
|
|
136
|
+
"@opentelemetry/api-logs": "^0.218.0",
|
|
137
|
+
"@opentelemetry/auto-instrumentations-node": "^0.76.0",
|
|
138
138
|
"@opentelemetry/core": "^2.6.0",
|
|
139
|
-
"@opentelemetry/exporter-logs-otlp-http": "^0.
|
|
140
|
-
"@opentelemetry/exporter-metrics-otlp-http": "^0.
|
|
141
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
142
|
-
"@opentelemetry/exporter-trace-otlp-proto": "^0.
|
|
143
|
-
"@opentelemetry/instrumentation": "^0.
|
|
139
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.218.0",
|
|
140
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.218.0",
|
|
141
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
|
|
142
|
+
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
143
|
+
"@opentelemetry/instrumentation": "^0.218.0",
|
|
144
144
|
"@opentelemetry/resources": "^2.6.0",
|
|
145
|
-
"@opentelemetry/sdk-logs": "^0.
|
|
145
|
+
"@opentelemetry/sdk-logs": "^0.218.0",
|
|
146
146
|
"@opentelemetry/sdk-metrics": "^2.6.0",
|
|
147
|
-
"@opentelemetry/sdk-node": "^0.
|
|
147
|
+
"@opentelemetry/sdk-node": "^0.218.0",
|
|
148
148
|
"@opentelemetry/sdk-trace-base": "^2.6.0",
|
|
149
149
|
"@opentelemetry/sdk-trace-node": "^2.6.0",
|
|
150
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
151
|
-
"@traceloop/ai-semantic-conventions": "^0.
|
|
152
|
-
"@traceloop/instrumentation-anthropic": "^0.
|
|
153
|
-
"@traceloop/instrumentation-bedrock": "^0.
|
|
154
|
-
"@traceloop/instrumentation-chromadb": "^0.
|
|
155
|
-
"@traceloop/instrumentation-cohere": "^0.
|
|
156
|
-
"@traceloop/instrumentation-llamaindex": "^0.
|
|
157
|
-
"@traceloop/instrumentation-openai": "^0.
|
|
158
|
-
"@traceloop/instrumentation-pinecone": "^0.
|
|
159
|
-
"@traceloop/instrumentation-qdrant": "^0.
|
|
160
|
-
"@traceloop/instrumentation-together": "^0.
|
|
161
|
-
"@traceloop/instrumentation-vertexai": "^0.
|
|
150
|
+
"@opentelemetry/semantic-conventions": "^1.41.1",
|
|
151
|
+
"@traceloop/ai-semantic-conventions": "^0.27.0",
|
|
152
|
+
"@traceloop/instrumentation-anthropic": "^0.27.0",
|
|
153
|
+
"@traceloop/instrumentation-bedrock": "^0.27.0",
|
|
154
|
+
"@traceloop/instrumentation-chromadb": "^0.27.0",
|
|
155
|
+
"@traceloop/instrumentation-cohere": "^0.27.0",
|
|
156
|
+
"@traceloop/instrumentation-llamaindex": "^0.27.0",
|
|
157
|
+
"@traceloop/instrumentation-openai": "^0.27.0",
|
|
158
|
+
"@traceloop/instrumentation-pinecone": "^0.27.0",
|
|
159
|
+
"@traceloop/instrumentation-qdrant": "^0.27.0",
|
|
160
|
+
"@traceloop/instrumentation-together": "^0.27.0",
|
|
161
|
+
"@traceloop/instrumentation-vertexai": "^0.27.0",
|
|
162
162
|
"import-in-the-middle": "^3.0.0",
|
|
163
163
|
"pino": "^10.3.1",
|
|
164
164
|
"pino-pretty": "^13.1.3",
|