@brizz/sdk 0.1.43 → 0.1.45
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 +44 -0
- package/dist/{chunk-QUV5HYJ2.cjs → chunk-3IGBYXLR.cjs} +4 -4
- package/dist/{chunk-FORVS4QW.cjs → chunk-5WBPX342.cjs} +7 -1
- package/dist/{chunk-Y7NMZAQT.js → chunk-AOT5NJDV.js} +6 -0
- package/dist/{chunk-7FQQHF5U.js → chunk-APOYOP7D.js} +1 -1
- package/dist/{chunk-5SWAZUC5.js → chunk-BAQTZKGI.js} +2 -2
- package/dist/{chunk-WTQTF57J.cjs → chunk-CBEDIRVK.cjs} +8 -8
- package/dist/index.cjs +395 -171
- package/dist/index.js +252 -28
- package/dist/{interrupt-ERCX5RXR.js → interrupt-A6O7N72X.js} +2 -2
- package/dist/interrupt-IKOUBQGN.cjs +12 -0
- package/dist/{mcp-UJD6KF7G.cjs → mcp-CCFYA5CI.cjs} +12 -12
- package/dist/{mcp-6R6KZ5U3.js → mcp-FTYCIWL4.js} +2 -2
- package/dist/types/cjs/index.d.ts +2 -2
- package/dist/types/cjs/internal/instrumentation/langchain.d.ts +4 -0
- package/dist/types/cjs/internal/semantic-conventions.d.ts +3 -0
- package/dist/types/cjs/internal/trace/agent.d.ts +18 -0
- package/dist/types/cjs/internal/trace/index.d.ts +2 -0
- package/dist/types/cjs/internal/trace/session.d.ts +2 -1
- package/dist/types/esm/index.d.ts +2 -2
- package/dist/types/esm/internal/instrumentation/langchain.d.ts +4 -0
- package/dist/types/esm/internal/semantic-conventions.d.ts +3 -0
- package/dist/types/esm/internal/trace/agent.d.ts +18 -0
- package/dist/types/esm/internal/trace/index.d.ts +2 -0
- package/dist/types/esm/internal/trace/session.d.ts +2 -1
- package/package.json +33 -31
- package/dist/interrupt-3NXOTY4N.cjs +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Span, AttributeValue } from '@opentelemetry/api';
|
|
1
|
+
import type { Context, Span, AttributeValue } from '@opentelemetry/api';
|
|
2
2
|
export declare function setCurrentSpanCustomProperties(properties: Record<string, AttributeValue>): void;
|
|
3
3
|
export declare function callWithProperties<A extends unknown[], F extends (...args: A) => ReturnType<F>>(properties: {
|
|
4
4
|
[name: string]: string;
|
|
@@ -6,6 +6,7 @@ export declare function callWithProperties<A extends unknown[], F extends (...ar
|
|
|
6
6
|
export declare function withProperties<F extends (this: any, ...args: any[]) => any>(properties: {
|
|
7
7
|
[name: string]: string;
|
|
8
8
|
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
9
|
+
export declare function propagatePropertiesImperatively(properties: Record<string, string>, base?: Context): void;
|
|
9
10
|
export declare function setUser(user: {
|
|
10
11
|
id: string;
|
|
11
12
|
email?: string;
|
|
@@ -2,8 +2,8 @@ import './internal/instrumentation/auto-init.js';
|
|
|
2
2
|
export { Brizz, type IBrizzInitializeOptions } from './internal/sdk.js';
|
|
3
3
|
export { type IInstrumentModules, type IMCPManualModules, } from './internal/instrumentation/index.js';
|
|
4
4
|
export { emitEvent, emitEventWithSessionId } from './internal/log/index.js';
|
|
5
|
-
export { getSpanExporter, getSpanProcessor, withSessionId, callWithSessionId, withProperties, callWithProperties, withMute, callWithMute, setCurrentSpanCustomProperties, setUser, setOrganization, setMessageId, setSessionId, setServiceName, withServiceName, callWithServiceName, withUser, callWithUser, withOrganization, callWithOrganization, withMessageId, callWithMessageId, Session, SessionTitle, startSession, startSessionTitle, getActiveSession, addExternalLink, recordFeedback, recordMetric, } from './internal/trace/index.js';
|
|
6
|
-
export type { IMuteOptions } from './internal/trace/index.js';
|
|
5
|
+
export { getSpanExporter, getSpanProcessor, withSessionId, callWithSessionId, withProperties, callWithProperties, withMute, callWithMute, setCurrentSpanCustomProperties, setUser, setOrganization, setMessageId, setSessionId, setServiceName, withServiceName, callWithServiceName, withUser, callWithUser, withOrganization, callWithOrganization, withMessageId, callWithMessageId, Session, SessionTitle, startAgent, withAgent, setAgent, startSession, startSessionTitle, getActiveSession, addExternalLink, recordFeedback, recordMetric, } from './internal/trace/index.js';
|
|
6
|
+
export type { IMuteOptions, AgentRef, IAgent, IAgentOptions } from './internal/trace/index.js';
|
|
7
7
|
export { getMetricsExporter, getMetricsReader } from './internal/metric/index.js';
|
|
8
8
|
export type { IMaskingConfig, ISpanMaskingConfig, ILogMaskingConfig, IEventMaskingConfig, IEventMaskingRule, MaskingMode, IAttributesMaskingRule, } from './internal/masking/index.js';
|
|
9
9
|
export { DEFAULT_PII_PATTERNS } from './internal/masking/patterns.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
|
|
2
|
+
export declare function patchCallbackManagerModule(module: unknown): boolean;
|
|
3
|
+
export declare function patchInstalledCallbackManager(): void;
|
|
4
|
+
export declare function restampLangChainSpan(span: ReadableSpan): void;
|
|
@@ -26,6 +26,9 @@ export declare const SERVICE_NAME_ATTRIBUTE = "brizz.service.name";
|
|
|
26
26
|
export declare const SESSION_TITLE_SPAN_NAME = "brizz.session_title";
|
|
27
27
|
export declare const SESSION_TITLE_GENERATION = "session.title_generation";
|
|
28
28
|
export declare const SESSION_TITLE = "brizz.session.title";
|
|
29
|
+
export declare const AGENT_ID = "internal.agent.id";
|
|
30
|
+
export declare const AGENT_PARENT_ID = "internal.agent.parent_id";
|
|
31
|
+
export declare const AGENT_NAME = "internal.agent.name";
|
|
29
32
|
export declare const INTERRUPT_TOOLS = "brizz.internal.interrupt";
|
|
30
33
|
export declare const INTERNAL_EVENT_PREFIX = "brizz.internal.";
|
|
31
34
|
export declare const EXTERNAL_LINK_EVENT_NAME = "brizz.internal.external_link";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IAgent {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly parentId: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly traceparent: string;
|
|
6
|
+
readonly sessionId: string;
|
|
7
|
+
readonly token: string;
|
|
8
|
+
}
|
|
9
|
+
export interface IAgentOptions {
|
|
10
|
+
name?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
parentId?: string;
|
|
13
|
+
token?: string;
|
|
14
|
+
}
|
|
15
|
+
export type AgentRef = string | IAgentOptions;
|
|
16
|
+
export declare function startAgent<T>(agent: AgentRef, callback: (agent: IAgent) => T): T;
|
|
17
|
+
export declare function withAgent<F extends (this: any, ...args: any[]) => any>(agent: AgentRef, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
18
|
+
export declare function setAgent(agent: AgentRef): IAgent;
|
|
@@ -2,3 +2,5 @@ export { TracingModule, getSpanExporter, getSpanProcessor } from './tracing.js';
|
|
|
2
2
|
export { BrizzBatchSpanProcessor, BrizzSimpleSpanProcessor } from './processors/span-processor.js';
|
|
3
3
|
export { withSessionId, callWithSessionId, withProperties, callWithProperties, withMute, callWithMute, setCurrentSpanCustomProperties, setUser, setOrganization, setMessageId, setSessionId, setServiceName, withServiceName, callWithServiceName, withUser, callWithUser, withOrganization, callWithOrganization, withMessageId, callWithMessageId, Session, SessionTitle, startSession, startSessionTitle, getActiveSession, addExternalLink, recordFeedback, recordMetric, } from './session.js';
|
|
4
4
|
export type { IMuteOptions } from './session.js';
|
|
5
|
+
export { startAgent, withAgent, setAgent } from './agent.js';
|
|
6
|
+
export type { AgentRef, IAgent, IAgentOptions } from './agent.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Span, AttributeValue } from '@opentelemetry/api';
|
|
1
|
+
import type { Context, Span, AttributeValue } from '@opentelemetry/api';
|
|
2
2
|
export declare function setCurrentSpanCustomProperties(properties: Record<string, AttributeValue>): void;
|
|
3
3
|
export declare function callWithProperties<A extends unknown[], F extends (...args: A) => ReturnType<F>>(properties: {
|
|
4
4
|
[name: string]: string;
|
|
@@ -6,6 +6,7 @@ export declare function callWithProperties<A extends unknown[], F extends (...ar
|
|
|
6
6
|
export declare function withProperties<F extends (this: any, ...args: any[]) => any>(properties: {
|
|
7
7
|
[name: string]: string;
|
|
8
8
|
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
9
|
+
export declare function propagatePropertiesImperatively(properties: Record<string, string>, base?: Context): void;
|
|
9
10
|
export declare function setUser(user: {
|
|
10
11
|
id: string;
|
|
11
12
|
email?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brizz/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenTelemetry-based observability SDK for AI applications",
|
|
6
6
|
"keywords": [
|
|
@@ -101,33 +101,34 @@
|
|
|
101
101
|
"registry": "https://registry.npmjs.org/"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
105
|
-
"@ai-sdk/openai": "^4.0.
|
|
106
|
-
"@ai-sdk/otel": "^1.0.
|
|
104
|
+
"@ai-sdk/anthropic": "^4.0.49",
|
|
105
|
+
"@ai-sdk/openai": "^4.0.60",
|
|
106
|
+
"@ai-sdk/otel": "^1.0.93",
|
|
107
107
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
108
|
-
"@arizeai/openinference-instrumentation-mcp": "^0.2.
|
|
108
|
+
"@arizeai/openinference-instrumentation-mcp": "^0.2.30",
|
|
109
109
|
"@babel/core": "^8.0.1",
|
|
110
110
|
"@babel/preset-env": "^8.0.2",
|
|
111
111
|
"@babel/preset-typescript": "^8.0.1",
|
|
112
|
-
"@changesets/changelog-github": "^1.0.
|
|
113
|
-
"@changesets/cli": "^3.0.
|
|
114
|
-
"@google/genai": "^2.
|
|
112
|
+
"@changesets/changelog-github": "^1.0.1",
|
|
113
|
+
"@changesets/cli": "^3.0.2",
|
|
114
|
+
"@google/genai": "^2.21.0",
|
|
115
|
+
"@langchain/core": "^1.1.41",
|
|
115
116
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
116
117
|
"@traceloop/instrumentation-google-generativeai": "^0.27.0",
|
|
117
118
|
"@traceloop/instrumentation-vertexai": "^0.27.0",
|
|
118
119
|
"@types/jest": "^30.0.0",
|
|
119
|
-
"@types/node": "^26.
|
|
120
|
-
"ai": "^7.0.
|
|
121
|
-
"babel-jest": "^30.
|
|
122
|
-
"jest": "^30.
|
|
123
|
-
"jest-environment-jsdom": "^30.
|
|
124
|
-
"openai": "^7.
|
|
125
|
-
"oxlint": "^1.
|
|
120
|
+
"@types/node": "^26.4.1",
|
|
121
|
+
"ai": "^7.0.93",
|
|
122
|
+
"babel-jest": "^30.5.1",
|
|
123
|
+
"jest": "^30.5.1",
|
|
124
|
+
"jest-environment-jsdom": "^30.5.1",
|
|
125
|
+
"openai": "^7.10.0",
|
|
126
|
+
"oxlint": "^1.81.0",
|
|
126
127
|
"prettier": "^3.9.6",
|
|
127
128
|
"tsup": "^8.5.1",
|
|
128
129
|
"typescript": "^7.0.2",
|
|
129
|
-
"vitest": "^
|
|
130
|
-
"zod": "^4.4
|
|
130
|
+
"vitest": "^5.0.0",
|
|
131
|
+
"zod": "^4.5.4"
|
|
131
132
|
},
|
|
132
133
|
"peerDependencies": {
|
|
133
134
|
"@ai-sdk/otel": "^1",
|
|
@@ -166,21 +167,21 @@
|
|
|
166
167
|
}
|
|
167
168
|
},
|
|
168
169
|
"dependencies": {
|
|
169
|
-
"@arizeai/openinference-instrumentation-langchain": "^4.0.
|
|
170
|
+
"@arizeai/openinference-instrumentation-langchain": "^4.0.23",
|
|
170
171
|
"@arizeai/openinference-instrumentation-openai": "^2.3.1",
|
|
171
172
|
"@opentelemetry/api": "^1.9.0",
|
|
172
|
-
"@opentelemetry/api-logs": "^0.
|
|
173
|
-
"@opentelemetry/core": "^2.
|
|
174
|
-
"@opentelemetry/exporter-logs-otlp-http": "^0.
|
|
175
|
-
"@opentelemetry/exporter-metrics-otlp-http": "^0.
|
|
176
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
177
|
-
"@opentelemetry/exporter-trace-otlp-proto": "^0.
|
|
178
|
-
"@opentelemetry/instrumentation": "^0.
|
|
179
|
-
"@opentelemetry/resources": "^2.
|
|
180
|
-
"@opentelemetry/sdk-logs": "^0.
|
|
181
|
-
"@opentelemetry/sdk-metrics": "^2.
|
|
182
|
-
"@opentelemetry/sdk-trace-base": "^2.
|
|
183
|
-
"@opentelemetry/sdk-trace-node": "^2.
|
|
173
|
+
"@opentelemetry/api-logs": "^0.222.0",
|
|
174
|
+
"@opentelemetry/core": "^2.11.0",
|
|
175
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.222.0",
|
|
176
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.222.0",
|
|
177
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.222.0",
|
|
178
|
+
"@opentelemetry/exporter-trace-otlp-proto": "^0.222.0",
|
|
179
|
+
"@opentelemetry/instrumentation": "^0.222.0",
|
|
180
|
+
"@opentelemetry/resources": "^2.11.0",
|
|
181
|
+
"@opentelemetry/sdk-logs": "^0.222.0",
|
|
182
|
+
"@opentelemetry/sdk-metrics": "^2.11.0",
|
|
183
|
+
"@opentelemetry/sdk-trace-base": "^2.11.0",
|
|
184
|
+
"@opentelemetry/sdk-trace-node": "^2.11.0",
|
|
184
185
|
"@opentelemetry/semantic-conventions": "^1.43.0",
|
|
185
186
|
"@traceloop/ai-semantic-conventions": "^0.27.0",
|
|
186
187
|
"@traceloop/instrumentation-anthropic": "^0.27.0",
|
|
@@ -198,7 +199,8 @@
|
|
|
198
199
|
"packageManager": "pnpm@10.17.0+sha512.fce8a3dd29a4ed2ec566fb53efbb04d8c44a0f05bc6f24a73046910fb9c3ce7afa35a0980500668fa3573345bd644644fa98338fa168235c80f4aa17aa17fbef",
|
|
199
200
|
"pnpm": {
|
|
200
201
|
"overrides": {
|
|
201
|
-
"@babel/core": "^8.0.1"
|
|
202
|
+
"@babel/core": "^8.0.1",
|
|
203
|
+
"@opentelemetry/core": "^2.11.0"
|
|
202
204
|
},
|
|
203
205
|
"updateConfig": {
|
|
204
206
|
"ignoreDependencies": [
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunkQUV5HYJ2cjs = require('./chunk-QUV5HYJ2.cjs');
|
|
6
|
-
require('./chunk-FORVS4QW.cjs');
|
|
7
|
-
require('./chunk-OBGZSXTJ.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.InterruptPropagator = _chunkQUV5HYJ2cjs.InterruptPropagator; exports._resetInterruptState = _chunkQUV5HYJ2cjs._resetInterruptState; exports.createInterruptIntegration = _chunkQUV5HYJ2cjs.createInterruptIntegration;
|