@brizz/sdk 0.1.32 → 0.1.33
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 +45 -0
- package/dist/{chunk-SCYD7XCI.cjs → chunk-3ITCDKTJ.cjs} +1 -1
- package/dist/{chunk-VGMJ3KUM.js → chunk-GRRKMMG6.js} +35 -1
- package/dist/{chunk-U474AL6K.js → chunk-KDFV63CU.js} +261 -5
- package/dist/{chunk-A3OOY5A2.cjs → chunk-LFLYWZ6D.cjs} +4 -4
- package/dist/chunk-LIFLVFK6.cjs +80 -0
- package/dist/{chunk-LTLONC6I.js → chunk-N4X2B6BC.js} +1 -1
- package/dist/{chunk-6M3CBP2N.js → chunk-PY6FJBVY.js} +1 -1
- package/dist/{chunk-IH7TSRRT.cjs → chunk-WXHBHJRJ.cjs} +321 -65
- package/dist/index.cjs +27 -7
- package/dist/index.d.cts +73 -1
- package/dist/index.d.ts +73 -1
- package/dist/index.js +28 -8
- package/dist/{interrupt-VMUSMALH.js → interrupt-AOYNN5AB.js} +2 -2
- package/dist/interrupt-EMUUN3ER.cjs +12 -0
- package/dist/{mcp-GXP22YAQ.cjs → mcp-OKSS2R56.cjs} +7 -7
- package/dist/{mcp-3YERODPL.js → mcp-XIHWT2AU.js} +2 -2
- package/dist/preload.cjs +7 -7
- package/dist/preload.js +4 -4
- package/package.json +5 -5
- package/dist/chunk-OZCOXBB7.cjs +0 -46
- package/dist/interrupt-6D6DA7R2.cjs +0 -12
package/dist/index.cjs
CHANGED
|
@@ -23,17 +23,27 @@
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
var _chunkWXHBHJRJcjs = require('./chunk-WXHBHJRJ.cjs');
|
|
27
37
|
require('./chunk-UNLNNKZ7.cjs');
|
|
28
|
-
require('./chunk-
|
|
38
|
+
require('./chunk-3ITCDKTJ.cjs');
|
|
29
39
|
|
|
30
40
|
|
|
31
41
|
|
|
32
42
|
|
|
33
43
|
|
|
34
44
|
var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
35
|
-
require('./chunk-
|
|
36
|
-
require('./chunk-
|
|
45
|
+
require('./chunk-LFLYWZ6D.cjs');
|
|
46
|
+
require('./chunk-LIFLVFK6.cjs');
|
|
37
47
|
require('./chunk-OBGZSXTJ.cjs');
|
|
38
48
|
|
|
39
49
|
// src/internal/instrumentation/auto-init.ts
|
|
@@ -83,7 +93,7 @@ function loadGenAIInstrumentations() {
|
|
|
83
93
|
function loadMCPInstrumentation() {
|
|
84
94
|
void (async () => {
|
|
85
95
|
try {
|
|
86
|
-
const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-
|
|
96
|
+
const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-OKSS2R56.cjs")));
|
|
87
97
|
const mcp = new MCPInstrumentation({ exceptionLogger });
|
|
88
98
|
_instrumentation.registerInstrumentations.call(void 0, { instrumentations: [mcp] });
|
|
89
99
|
_chunkWC573FCIcjs.logger.debug("Auto-loaded MCP instrumentation");
|
|
@@ -125,7 +135,7 @@ function loadVercelAITelemetry() {
|
|
|
125
135
|
}
|
|
126
136
|
const isV7 = typeof ai.registerTelemetry === "function";
|
|
127
137
|
const integrations = [];
|
|
128
|
-
const { createInterruptIntegration } = await Promise.resolve().then(() => _interopRequireWildcard(require("./interrupt-
|
|
138
|
+
const { createInterruptIntegration } = await Promise.resolve().then(() => _interopRequireWildcard(require("./interrupt-EMUUN3ER.cjs")));
|
|
129
139
|
integrations.push(createInterruptIntegration());
|
|
130
140
|
let otelCollectorLoaded = false;
|
|
131
141
|
try {
|
|
@@ -206,4 +216,14 @@ var init_exports = {};
|
|
|
206
216
|
|
|
207
217
|
|
|
208
218
|
|
|
209
|
-
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
exports.Brizz = _chunkWXHBHJRJcjs.Brizz; exports.DEFAULT_PII_PATTERNS = _chunkWXHBHJRJcjs.DEFAULT_PII_PATTERNS; exports.LogLevel = _chunkWC573FCIcjs.LogLevel; exports.Session = _chunkWXHBHJRJcjs.Session; exports.SessionTitle = _chunkWXHBHJRJcjs.SessionTitle; exports.SeverityNumber = _apilogs.SeverityNumber; exports.addExternalLink = _chunkWXHBHJRJcjs.addExternalLink; exports.callWithMessageId = _chunkWXHBHJRJcjs.callWithMessageId; exports.callWithMute = _chunkWXHBHJRJcjs.callWithMute; exports.callWithOrganization = _chunkWXHBHJRJcjs.callWithOrganization; exports.callWithProperties = _chunkWXHBHJRJcjs.callWithProperties; exports.callWithSessionId = _chunkWXHBHJRJcjs.callWithSessionId; exports.callWithUser = _chunkWXHBHJRJcjs.callWithUser; exports.detectRuntime = _chunkWXHBHJRJcjs.detectRuntime; exports.emitEvent = _chunkWXHBHJRJcjs.emitEvent; exports.emitEventWithSessionId = _chunkWXHBHJRJcjs.emitEventWithSessionId; exports.getActiveSession = _chunkWXHBHJRJcjs.getActiveSession; exports.getLogLevel = _chunkWC573FCIcjs.getLogLevel; exports.getMetricsExporter = _chunkWXHBHJRJcjs.getMetricsExporter; exports.getMetricsReader = _chunkWXHBHJRJcjs.getMetricsReader; exports.getSpanExporter = _chunkWXHBHJRJcjs.getSpanExporter; exports.getSpanProcessor = _chunkWXHBHJRJcjs.getSpanProcessor; exports.init = init_exports; exports.logger = _chunkWC573FCIcjs.logger; exports.maskAttributes = _chunkWXHBHJRJcjs.maskAttributes; exports.maskValue = _chunkWXHBHJRJcjs.maskValue; exports.recordFeedback = _chunkWXHBHJRJcjs.recordFeedback; exports.setCurrentSpanCustomProperties = _chunkWXHBHJRJcjs.setCurrentSpanCustomProperties; exports.setLogLevel = _chunkWC573FCIcjs.setLogLevel; exports.setMessageId = _chunkWXHBHJRJcjs.setMessageId; exports.setOrganization = _chunkWXHBHJRJcjs.setOrganization; exports.setUser = _chunkWXHBHJRJcjs.setUser; exports.startSession = _chunkWXHBHJRJcjs.startSession; exports.startSessionTitle = _chunkWXHBHJRJcjs.startSessionTitle; exports.withMessageId = _chunkWXHBHJRJcjs.withMessageId; exports.withMute = _chunkWXHBHJRJcjs.withMute; exports.withOrganization = _chunkWXHBHJRJcjs.withOrganization; exports.withProperties = _chunkWXHBHJRJcjs.withProperties; exports.withSessionId = _chunkWXHBHJRJcjs.withSessionId; exports.withUser = _chunkWXHBHJRJcjs.withUser;
|
package/dist/index.d.cts
CHANGED
|
@@ -143,6 +143,54 @@ declare function callWithProperties<A extends unknown[], F extends (...args: A)
|
|
|
143
143
|
declare function withProperties<F extends (this: any, ...args: any[]) => any>(properties: {
|
|
144
144
|
[name: string]: string;
|
|
145
145
|
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
146
|
+
declare function setUser(user: {
|
|
147
|
+
id: string;
|
|
148
|
+
email?: string;
|
|
149
|
+
name?: string;
|
|
150
|
+
role?: string;
|
|
151
|
+
plan?: string;
|
|
152
|
+
traits?: Record<string, string>;
|
|
153
|
+
}): void;
|
|
154
|
+
declare function setOrganization(org: {
|
|
155
|
+
id: string;
|
|
156
|
+
name?: string;
|
|
157
|
+
plan?: string;
|
|
158
|
+
domain?: string;
|
|
159
|
+
traits?: Record<string, string>;
|
|
160
|
+
}): void;
|
|
161
|
+
declare function setMessageId(id: string): void;
|
|
162
|
+
declare function callWithUser<A extends unknown[], F extends (...args: A) => ReturnType<F>>(user: {
|
|
163
|
+
id: string;
|
|
164
|
+
email?: string;
|
|
165
|
+
name?: string;
|
|
166
|
+
role?: string;
|
|
167
|
+
plan?: string;
|
|
168
|
+
traits?: Record<string, string>;
|
|
169
|
+
}, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
170
|
+
declare function withUser<F extends (this: any, ...args: any[]) => any>(user: {
|
|
171
|
+
id: string;
|
|
172
|
+
email?: string;
|
|
173
|
+
name?: string;
|
|
174
|
+
role?: string;
|
|
175
|
+
plan?: string;
|
|
176
|
+
traits?: Record<string, string>;
|
|
177
|
+
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
178
|
+
declare function callWithOrganization<A extends unknown[], F extends (...args: A) => ReturnType<F>>(org: {
|
|
179
|
+
id: string;
|
|
180
|
+
name?: string;
|
|
181
|
+
plan?: string;
|
|
182
|
+
domain?: string;
|
|
183
|
+
traits?: Record<string, string>;
|
|
184
|
+
}, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
185
|
+
declare function withOrganization<F extends (this: any, ...args: any[]) => any>(org: {
|
|
186
|
+
id: string;
|
|
187
|
+
name?: string;
|
|
188
|
+
plan?: string;
|
|
189
|
+
domain?: string;
|
|
190
|
+
traits?: Record<string, string>;
|
|
191
|
+
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
192
|
+
declare function callWithMessageId<A extends unknown[], F extends (...args: A) => ReturnType<F>>(id: string, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
193
|
+
declare function withMessageId<F extends (this: any, ...args: any[]) => any>(id: string, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
146
194
|
interface IMuteOptions {
|
|
147
195
|
input?: boolean;
|
|
148
196
|
output?: boolean;
|
|
@@ -163,6 +211,21 @@ declare class Session {
|
|
|
163
211
|
setOutput(text: string | null, context?: Record<string, AttributeValue>): void;
|
|
164
212
|
setTitle(title: string): void;
|
|
165
213
|
updateProperties(properties: Record<string, AttributeValue>): void;
|
|
214
|
+
setUser(user: {
|
|
215
|
+
id: string;
|
|
216
|
+
email?: string;
|
|
217
|
+
name?: string;
|
|
218
|
+
role?: string;
|
|
219
|
+
plan?: string;
|
|
220
|
+
traits?: Record<string, string>;
|
|
221
|
+
}): void;
|
|
222
|
+
setOrganization(org: {
|
|
223
|
+
id: string;
|
|
224
|
+
name?: string;
|
|
225
|
+
plan?: string;
|
|
226
|
+
domain?: string;
|
|
227
|
+
traits?: Record<string, string>;
|
|
228
|
+
}): void;
|
|
166
229
|
addExternalLink(url: string, options?: {
|
|
167
230
|
title?: string;
|
|
168
231
|
linkType?: string;
|
|
@@ -179,6 +242,15 @@ declare function addExternalLink(url: string, options?: {
|
|
|
179
242
|
title?: string;
|
|
180
243
|
linkType?: string;
|
|
181
244
|
}): void;
|
|
245
|
+
declare function recordFeedback(type: string, options?: {
|
|
246
|
+
score?: number;
|
|
247
|
+
reason?: string;
|
|
248
|
+
comment?: string;
|
|
249
|
+
source?: string;
|
|
250
|
+
messageId?: string;
|
|
251
|
+
sessionId?: string;
|
|
252
|
+
traits?: Record<string, string>;
|
|
253
|
+
}): void;
|
|
182
254
|
declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
183
255
|
mode?: 'default' | 'title';
|
|
184
256
|
}): T;
|
|
@@ -202,4 +274,4 @@ declare namespace init {
|
|
|
202
274
|
export { };
|
|
203
275
|
}
|
|
204
276
|
|
|
205
|
-
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type IMuteOptions, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, addExternalLink, callWithMute, callWithProperties, callWithSessionId, detectRuntime, emitEvent, emitEventWithSessionId, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setCurrentSpanCustomProperties, setLogLevel, startSession, startSessionTitle, withMute, withProperties, withSessionId };
|
|
277
|
+
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type IMuteOptions, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, addExternalLink, callWithMessageId, callWithMute, callWithOrganization, callWithProperties, callWithSessionId, callWithUser, detectRuntime, emitEvent, emitEventWithSessionId, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, recordFeedback, setCurrentSpanCustomProperties, setLogLevel, setMessageId, setOrganization, setUser, startSession, startSessionTitle, withMessageId, withMute, withOrganization, withProperties, withSessionId, withUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -143,6 +143,54 @@ declare function callWithProperties<A extends unknown[], F extends (...args: A)
|
|
|
143
143
|
declare function withProperties<F extends (this: any, ...args: any[]) => any>(properties: {
|
|
144
144
|
[name: string]: string;
|
|
145
145
|
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
146
|
+
declare function setUser(user: {
|
|
147
|
+
id: string;
|
|
148
|
+
email?: string;
|
|
149
|
+
name?: string;
|
|
150
|
+
role?: string;
|
|
151
|
+
plan?: string;
|
|
152
|
+
traits?: Record<string, string>;
|
|
153
|
+
}): void;
|
|
154
|
+
declare function setOrganization(org: {
|
|
155
|
+
id: string;
|
|
156
|
+
name?: string;
|
|
157
|
+
plan?: string;
|
|
158
|
+
domain?: string;
|
|
159
|
+
traits?: Record<string, string>;
|
|
160
|
+
}): void;
|
|
161
|
+
declare function setMessageId(id: string): void;
|
|
162
|
+
declare function callWithUser<A extends unknown[], F extends (...args: A) => ReturnType<F>>(user: {
|
|
163
|
+
id: string;
|
|
164
|
+
email?: string;
|
|
165
|
+
name?: string;
|
|
166
|
+
role?: string;
|
|
167
|
+
plan?: string;
|
|
168
|
+
traits?: Record<string, string>;
|
|
169
|
+
}, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
170
|
+
declare function withUser<F extends (this: any, ...args: any[]) => any>(user: {
|
|
171
|
+
id: string;
|
|
172
|
+
email?: string;
|
|
173
|
+
name?: string;
|
|
174
|
+
role?: string;
|
|
175
|
+
plan?: string;
|
|
176
|
+
traits?: Record<string, string>;
|
|
177
|
+
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
178
|
+
declare function callWithOrganization<A extends unknown[], F extends (...args: A) => ReturnType<F>>(org: {
|
|
179
|
+
id: string;
|
|
180
|
+
name?: string;
|
|
181
|
+
plan?: string;
|
|
182
|
+
domain?: string;
|
|
183
|
+
traits?: Record<string, string>;
|
|
184
|
+
}, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
185
|
+
declare function withOrganization<F extends (this: any, ...args: any[]) => any>(org: {
|
|
186
|
+
id: string;
|
|
187
|
+
name?: string;
|
|
188
|
+
plan?: string;
|
|
189
|
+
domain?: string;
|
|
190
|
+
traits?: Record<string, string>;
|
|
191
|
+
}, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
192
|
+
declare function callWithMessageId<A extends unknown[], F extends (...args: A) => ReturnType<F>>(id: string, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
|
|
193
|
+
declare function withMessageId<F extends (this: any, ...args: any[]) => any>(id: string, fn: F, thisArg?: ThisParameterType<F>): F;
|
|
146
194
|
interface IMuteOptions {
|
|
147
195
|
input?: boolean;
|
|
148
196
|
output?: boolean;
|
|
@@ -163,6 +211,21 @@ declare class Session {
|
|
|
163
211
|
setOutput(text: string | null, context?: Record<string, AttributeValue>): void;
|
|
164
212
|
setTitle(title: string): void;
|
|
165
213
|
updateProperties(properties: Record<string, AttributeValue>): void;
|
|
214
|
+
setUser(user: {
|
|
215
|
+
id: string;
|
|
216
|
+
email?: string;
|
|
217
|
+
name?: string;
|
|
218
|
+
role?: string;
|
|
219
|
+
plan?: string;
|
|
220
|
+
traits?: Record<string, string>;
|
|
221
|
+
}): void;
|
|
222
|
+
setOrganization(org: {
|
|
223
|
+
id: string;
|
|
224
|
+
name?: string;
|
|
225
|
+
plan?: string;
|
|
226
|
+
domain?: string;
|
|
227
|
+
traits?: Record<string, string>;
|
|
228
|
+
}): void;
|
|
166
229
|
addExternalLink(url: string, options?: {
|
|
167
230
|
title?: string;
|
|
168
231
|
linkType?: string;
|
|
@@ -179,6 +242,15 @@ declare function addExternalLink(url: string, options?: {
|
|
|
179
242
|
title?: string;
|
|
180
243
|
linkType?: string;
|
|
181
244
|
}): void;
|
|
245
|
+
declare function recordFeedback(type: string, options?: {
|
|
246
|
+
score?: number;
|
|
247
|
+
reason?: string;
|
|
248
|
+
comment?: string;
|
|
249
|
+
source?: string;
|
|
250
|
+
messageId?: string;
|
|
251
|
+
sessionId?: string;
|
|
252
|
+
traits?: Record<string, string>;
|
|
253
|
+
}): void;
|
|
182
254
|
declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
183
255
|
mode?: 'default' | 'title';
|
|
184
256
|
}): T;
|
|
@@ -202,4 +274,4 @@ declare namespace init {
|
|
|
202
274
|
export { };
|
|
203
275
|
}
|
|
204
276
|
|
|
205
|
-
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type IMuteOptions, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, addExternalLink, callWithMute, callWithProperties, callWithSessionId, detectRuntime, emitEvent, emitEventWithSessionId, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, setCurrentSpanCustomProperties, setLogLevel, startSession, startSessionTitle, withMute, withProperties, withSessionId };
|
|
277
|
+
export { Brizz, DEFAULT_PII_PATTERNS, type IAttributesMaskingRule, type IBrizzInitializeOptions, type IEventMaskingConfig, type IEventMaskingRule, type IInstrumentModules, type ILogMaskingConfig, type ILogger, type IMCPManualModules, type IMaskingConfig, type IMuteOptions, type ISpanMaskingConfig, LogLevel, type MaskingMode, type RuntimeInfo, Session, SessionTitle, addExternalLink, callWithMessageId, callWithMute, callWithOrganization, callWithProperties, callWithSessionId, callWithUser, detectRuntime, emitEvent, emitEventWithSessionId, getActiveSession, getLogLevel, getMetricsExporter, getMetricsReader, getSpanExporter, getSpanProcessor, init, logger, maskAttributes, maskValue, recordFeedback, setCurrentSpanCustomProperties, setLogLevel, setMessageId, setOrganization, setUser, startSession, startSessionTitle, withMessageId, withMute, withOrganization, withProperties, withSessionId, withUser };
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,12 @@ import {
|
|
|
4
4
|
Session,
|
|
5
5
|
SessionTitle,
|
|
6
6
|
addExternalLink,
|
|
7
|
+
callWithMessageId,
|
|
7
8
|
callWithMute,
|
|
9
|
+
callWithOrganization,
|
|
8
10
|
callWithProperties,
|
|
9
11
|
callWithSessionId,
|
|
12
|
+
callWithUser,
|
|
10
13
|
detectRuntime,
|
|
11
14
|
emitEvent,
|
|
12
15
|
emitEventWithSessionId,
|
|
@@ -17,23 +20,30 @@ import {
|
|
|
17
20
|
getSpanProcessor,
|
|
18
21
|
maskAttributes,
|
|
19
22
|
maskValue,
|
|
23
|
+
recordFeedback,
|
|
20
24
|
setCurrentSpanCustomProperties,
|
|
25
|
+
setMessageId,
|
|
26
|
+
setOrganization,
|
|
27
|
+
setUser,
|
|
21
28
|
startSession,
|
|
22
29
|
startSessionTitle,
|
|
30
|
+
withMessageId,
|
|
23
31
|
withMute,
|
|
32
|
+
withOrganization,
|
|
24
33
|
withProperties,
|
|
25
|
-
withSessionId
|
|
26
|
-
|
|
34
|
+
withSessionId,
|
|
35
|
+
withUser
|
|
36
|
+
} from "./chunk-KDFV63CU.js";
|
|
27
37
|
import "./chunk-7SUF4VVI.js";
|
|
28
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-PY6FJBVY.js";
|
|
29
39
|
import {
|
|
30
40
|
LogLevel,
|
|
31
41
|
getLogLevel,
|
|
32
42
|
logger,
|
|
33
43
|
setLogLevel
|
|
34
44
|
} from "./chunk-Y4HNUX3Q.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-N4X2B6BC.js";
|
|
46
|
+
import "./chunk-GRRKMMG6.js";
|
|
37
47
|
import "./chunk-3RG5ZIWI.js";
|
|
38
48
|
|
|
39
49
|
// src/internal/instrumentation/auto-init.ts
|
|
@@ -83,7 +93,7 @@ function loadGenAIInstrumentations() {
|
|
|
83
93
|
function loadMCPInstrumentation() {
|
|
84
94
|
void (async () => {
|
|
85
95
|
try {
|
|
86
|
-
const { MCPInstrumentation } = await import("./mcp-
|
|
96
|
+
const { MCPInstrumentation } = await import("./mcp-XIHWT2AU.js");
|
|
87
97
|
const mcp = new MCPInstrumentation({ exceptionLogger });
|
|
88
98
|
registerInstrumentations({ instrumentations: [mcp] });
|
|
89
99
|
logger.debug("Auto-loaded MCP instrumentation");
|
|
@@ -125,7 +135,7 @@ function loadVercelAITelemetry() {
|
|
|
125
135
|
}
|
|
126
136
|
const isV7 = typeof ai.registerTelemetry === "function";
|
|
127
137
|
const integrations = [];
|
|
128
|
-
const { createInterruptIntegration } = await import("./interrupt-
|
|
138
|
+
const { createInterruptIntegration } = await import("./interrupt-AOYNN5AB.js");
|
|
129
139
|
integrations.push(createInterruptIntegration());
|
|
130
140
|
let otelCollectorLoaded = false;
|
|
131
141
|
try {
|
|
@@ -183,9 +193,12 @@ export {
|
|
|
183
193
|
SessionTitle,
|
|
184
194
|
SeverityNumber,
|
|
185
195
|
addExternalLink,
|
|
196
|
+
callWithMessageId,
|
|
186
197
|
callWithMute,
|
|
198
|
+
callWithOrganization,
|
|
187
199
|
callWithProperties,
|
|
188
200
|
callWithSessionId,
|
|
201
|
+
callWithUser,
|
|
189
202
|
detectRuntime,
|
|
190
203
|
emitEvent,
|
|
191
204
|
emitEventWithSessionId,
|
|
@@ -199,11 +212,18 @@ export {
|
|
|
199
212
|
logger,
|
|
200
213
|
maskAttributes,
|
|
201
214
|
maskValue,
|
|
215
|
+
recordFeedback,
|
|
202
216
|
setCurrentSpanCustomProperties,
|
|
203
217
|
setLogLevel,
|
|
218
|
+
setMessageId,
|
|
219
|
+
setOrganization,
|
|
220
|
+
setUser,
|
|
204
221
|
startSession,
|
|
205
222
|
startSessionTitle,
|
|
223
|
+
withMessageId,
|
|
206
224
|
withMute,
|
|
225
|
+
withOrganization,
|
|
207
226
|
withProperties,
|
|
208
|
-
withSessionId
|
|
227
|
+
withSessionId,
|
|
228
|
+
withUser
|
|
209
229
|
};
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
InterruptPropagator,
|
|
3
3
|
_resetInterruptState,
|
|
4
4
|
createInterruptIntegration
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-N4X2B6BC.js";
|
|
6
|
+
import "./chunk-GRRKMMG6.js";
|
|
7
7
|
import "./chunk-3RG5ZIWI.js";
|
|
8
8
|
export {
|
|
9
9
|
InterruptPropagator,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkLFLYWZ6Dcjs = require('./chunk-LFLYWZ6D.cjs');
|
|
6
|
+
require('./chunk-LIFLVFK6.cjs');
|
|
7
|
+
require('./chunk-OBGZSXTJ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.InterruptPropagator = _chunkLFLYWZ6Dcjs.InterruptPropagator; exports._resetInterruptState = _chunkLFLYWZ6Dcjs._resetInterruptState; exports.createInterruptIntegration = _chunkLFLYWZ6Dcjs.createInterruptIntegration;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk3ITCDKTJcjs = require('./chunk-3ITCDKTJ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
@@ -8,7 +8,7 @@ var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkLIFLVFK6cjs = require('./chunk-LIFLVFK6.cjs');
|
|
12
12
|
require('./chunk-OBGZSXTJ.cjs');
|
|
13
13
|
|
|
14
14
|
// src/internal/instrumentation/mcp/instrumentation.ts
|
|
@@ -139,7 +139,7 @@ function stampAndPropagateSession(span, sessionId, baseContext = _api.context.ac
|
|
|
139
139
|
}
|
|
140
140
|
if (span.isRecording()) {
|
|
141
141
|
try {
|
|
142
|
-
span.setAttribute(`${
|
|
142
|
+
span.setAttribute(`${_chunkLIFLVFK6cjs.BRIZZ}.${_chunkLIFLVFK6cjs.SESSION_ID}`, sessionId);
|
|
143
143
|
} catch (error) {
|
|
144
144
|
_chunkWC573FCIcjs.logger.warn(
|
|
145
145
|
`Brizz MCP: failed to stamp session id on span: ${String(error)}`
|
|
@@ -147,10 +147,10 @@ function stampAndPropagateSession(span, sessionId, baseContext = _api.context.ac
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
try {
|
|
150
|
-
const prev = baseContext.getValue(
|
|
151
|
-
const merged = prev ? { ...prev, [
|
|
150
|
+
const prev = baseContext.getValue(_chunkLIFLVFK6cjs.PROPERTIES_CONTEXT_KEY);
|
|
151
|
+
const merged = prev ? { ...prev, [_chunkLIFLVFK6cjs.SESSION_ID]: sessionId } : { [_chunkLIFLVFK6cjs.SESSION_ID]: sessionId };
|
|
152
152
|
return {
|
|
153
|
-
context: baseContext.setValue(
|
|
153
|
+
context: baseContext.setValue(_chunkLIFLVFK6cjs.PROPERTIES_CONTEXT_KEY, merged),
|
|
154
154
|
sessionId
|
|
155
155
|
};
|
|
156
156
|
} catch (error) {
|
|
@@ -570,7 +570,7 @@ function safeEnd(span) {
|
|
|
570
570
|
|
|
571
571
|
// src/internal/instrumentation/mcp/version.ts
|
|
572
572
|
var INSTRUMENTATION_NAME = "@brizz/sdk/mcp";
|
|
573
|
-
var INSTRUMENTATION_VERSION =
|
|
573
|
+
var INSTRUMENTATION_VERSION = _chunk3ITCDKTJcjs.getSDKVersion.call(void 0, );
|
|
574
574
|
|
|
575
575
|
// src/internal/instrumentation/mcp/instrumentation.ts
|
|
576
576
|
var PROTOCOL_MODULE_NAME = "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSDKVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PY6FJBVY.js";
|
|
4
4
|
import {
|
|
5
5
|
logger
|
|
6
6
|
} from "./chunk-Y4HNUX3Q.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
BRIZZ,
|
|
9
9
|
PROPERTIES_CONTEXT_KEY,
|
|
10
10
|
SESSION_ID
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GRRKMMG6.js";
|
|
12
12
|
import "./chunk-3RG5ZIWI.js";
|
|
13
13
|
|
|
14
14
|
// src/internal/instrumentation/mcp/instrumentation.ts
|
package/dist/preload.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict"; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWXHBHJRJcjs = require('./chunk-WXHBHJRJ.cjs');
|
|
5
5
|
require('./chunk-UNLNNKZ7.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-3ITCDKTJ.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-LFLYWZ6D.cjs');
|
|
12
|
+
require('./chunk-LIFLVFK6.cjs');
|
|
13
13
|
require('./chunk-OBGZSXTJ.cjs');
|
|
14
14
|
|
|
15
15
|
// src/node/loader.ts
|
|
@@ -96,16 +96,16 @@ if (globalThis[LOADER_REGISTERED_KEY] !== true) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
// src/preload.ts
|
|
99
|
-
var runtime =
|
|
99
|
+
var runtime = _chunkWXHBHJRJcjs.detectRuntime.call(void 0, );
|
|
100
100
|
if (runtime.isESM && runtime.supportsLoaderAPI) {
|
|
101
101
|
maybeRegisterESMLoader();
|
|
102
102
|
}
|
|
103
103
|
try {
|
|
104
104
|
const logLevel = process.env["BRIZZ_LOG_LEVEL"] || _chunkWC573FCIcjs.DEFAULT_LOG_LEVEL.toString();
|
|
105
105
|
if (process.env["BRIZZ_DSN"]) {
|
|
106
|
-
|
|
106
|
+
_chunkWXHBHJRJcjs.Brizz.initialize({ logLevel, disableNodeSdk: false });
|
|
107
107
|
} else {
|
|
108
|
-
|
|
108
|
+
_chunkWXHBHJRJcjs.Brizz.initialize({
|
|
109
109
|
apiKey: process.env["BRIZZ_API_KEY"],
|
|
110
110
|
baseUrl: process.env["BRIZZ_BASE_URL"],
|
|
111
111
|
appName: process.env["BRIZZ_APP_NAME"] || process.env["OTEL_SERVICE_NAME"],
|
package/dist/preload.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Brizz,
|
|
3
3
|
detectRuntime
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KDFV63CU.js";
|
|
5
5
|
import "./chunk-7SUF4VVI.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-PY6FJBVY.js";
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_LOG_LEVEL,
|
|
9
9
|
logger
|
|
10
10
|
} from "./chunk-Y4HNUX3Q.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-N4X2B6BC.js";
|
|
12
|
+
import "./chunk-GRRKMMG6.js";
|
|
13
13
|
import "./chunk-3RG5ZIWI.js";
|
|
14
14
|
|
|
15
15
|
// src/node/loader.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brizz/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenTelemetry-based observability SDK for AI applications",
|
|
6
6
|
"keywords": [
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"registry": "https://registry.npmjs.org/"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
98
|
+
"@ai-sdk/anthropic": "^4.0.9",
|
|
99
99
|
"@ai-sdk/openai": "^4.0.8",
|
|
100
|
-
"@ai-sdk/otel": "^1.0.
|
|
100
|
+
"@ai-sdk/otel": "^1.0.17",
|
|
101
101
|
"@arizeai/openinference-instrumentation-mcp": "^0.2.20",
|
|
102
102
|
"@changesets/changelog-github": "^0.7.0",
|
|
103
103
|
"@changesets/cli": "^2.30.0",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@types/node": "^26.1.0",
|
|
109
109
|
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
110
110
|
"@typescript-eslint/parser": "^8.63.0",
|
|
111
|
-
"ai": "^7.0.
|
|
111
|
+
"ai": "^7.0.17",
|
|
112
112
|
"eslint": "^10.6.0",
|
|
113
113
|
"eslint-config-prettier": "^10.1.8",
|
|
114
114
|
"eslint-plugin-import": "^2.32.0",
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"@traceloop/instrumentation-pinecone": "^0.27.0",
|
|
183
183
|
"@traceloop/instrumentation-qdrant": "^0.27.0",
|
|
184
184
|
"@traceloop/instrumentation-together": "^0.27.0",
|
|
185
|
-
"import-in-the-middle": "^3.3.
|
|
185
|
+
"import-in-the-middle": "^3.3.1",
|
|
186
186
|
"pino": "^10.3.1",
|
|
187
187
|
"pino-pretty": "^13.1.3",
|
|
188
188
|
"tslib": "^2.8.1"
|
package/dist/chunk-OZCOXBB7.cjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/internal/semantic-conventions.ts
|
|
2
|
-
var _api = require('@opentelemetry/api');
|
|
3
|
-
var BRIZZ = "brizz";
|
|
4
|
-
var PROPERTIES = "properties";
|
|
5
|
-
var SESSION_ID = "session.id";
|
|
6
|
-
var PROPERTIES_CONTEXT_KEY = _api.createContextKey.call(void 0, PROPERTIES);
|
|
7
|
-
var SESSION_OBJECT_CONTEXT_KEY = _api.createContextKey.call(void 0, "brizz.session.object");
|
|
8
|
-
var SESSION_INPUT = "brizz.session.input";
|
|
9
|
-
var SESSION_OUTPUT = "brizz.session.output";
|
|
10
|
-
var SESSION_INPUT_CONTEXT = "brizz.session.input.context";
|
|
11
|
-
var SESSION_OUTPUT_CONTEXT = "brizz.session.output.context";
|
|
12
|
-
var SESSION_SPAN_NAME = "brizz.start_session";
|
|
13
|
-
var MUTE_INPUT = "mute.input";
|
|
14
|
-
var MUTE_OUTPUT = "mute.output";
|
|
15
|
-
var SESSION_TITLE_SPAN_NAME = "brizz.session_title";
|
|
16
|
-
var SESSION_TITLE_GENERATION = "session.title_generation";
|
|
17
|
-
var SESSION_TITLE = "brizz.session.title";
|
|
18
|
-
var INTERRUPT_TOOLS = "brizz.internal.interrupt";
|
|
19
|
-
var INTERNAL_EVENT_PREFIX = "brizz.internal.";
|
|
20
|
-
var EXTERNAL_LINK_EVENT_NAME = "brizz.internal.external_link";
|
|
21
|
-
var EXTERNAL_LINK_URL = "brizz.internal.external_link.url";
|
|
22
|
-
var EXTERNAL_LINK_TITLE = "brizz.internal.external_link.title";
|
|
23
|
-
var EXTERNAL_LINK_TYPE = "brizz.internal.external_link.type";
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
exports.BRIZZ = BRIZZ; exports.SESSION_ID = SESSION_ID; exports.PROPERTIES_CONTEXT_KEY = PROPERTIES_CONTEXT_KEY; exports.SESSION_OBJECT_CONTEXT_KEY = SESSION_OBJECT_CONTEXT_KEY; exports.SESSION_INPUT = SESSION_INPUT; exports.SESSION_OUTPUT = SESSION_OUTPUT; exports.SESSION_INPUT_CONTEXT = SESSION_INPUT_CONTEXT; exports.SESSION_OUTPUT_CONTEXT = SESSION_OUTPUT_CONTEXT; exports.SESSION_SPAN_NAME = SESSION_SPAN_NAME; exports.MUTE_INPUT = MUTE_INPUT; exports.MUTE_OUTPUT = MUTE_OUTPUT; exports.SESSION_TITLE_SPAN_NAME = SESSION_TITLE_SPAN_NAME; exports.SESSION_TITLE_GENERATION = SESSION_TITLE_GENERATION; exports.SESSION_TITLE = SESSION_TITLE; exports.INTERRUPT_TOOLS = INTERRUPT_TOOLS; exports.INTERNAL_EVENT_PREFIX = INTERNAL_EVENT_PREFIX; exports.EXTERNAL_LINK_EVENT_NAME = EXTERNAL_LINK_EVENT_NAME; exports.EXTERNAL_LINK_URL = EXTERNAL_LINK_URL; exports.EXTERNAL_LINK_TITLE = EXTERNAL_LINK_TITLE; exports.EXTERNAL_LINK_TYPE = EXTERNAL_LINK_TYPE;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunkA3OOY5A2cjs = require('./chunk-A3OOY5A2.cjs');
|
|
6
|
-
require('./chunk-OZCOXBB7.cjs');
|
|
7
|
-
require('./chunk-OBGZSXTJ.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.InterruptPropagator = _chunkA3OOY5A2cjs.InterruptPropagator; exports._resetInterruptState = _chunkA3OOY5A2cjs._resetInterruptState; exports.createInterruptIntegration = _chunkA3OOY5A2cjs.createInterruptIntegration;
|