@brizz/sdk 0.1.33 → 0.1.35
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 +72 -1
- package/dist/{chunk-N4X2B6BC.js → chunk-24CEDVD2.js} +1 -1
- package/dist/{chunk-WXHBHJRJ.cjs → chunk-D27LNW3M.cjs} +275 -124
- package/dist/{chunk-PY6FJBVY.js → chunk-GSKXPOLQ.js} +1 -1
- package/dist/{chunk-3ITCDKTJ.cjs → chunk-HZOBDXDS.cjs} +1 -1
- package/dist/chunk-KFETJN5M.cjs +63 -0
- package/dist/{chunk-KDFV63CU.js → chunk-KP3KG66W.js} +166 -15
- package/dist/{chunk-LFLYWZ6D.cjs → chunk-M3UGFLH7.cjs} +4 -4
- package/dist/{chunk-LIFLVFK6.cjs → chunk-NEF2O7HF.cjs} +38 -1
- package/dist/{chunk-GRRKMMG6.js → chunk-QY4VADPP.js} +38 -1
- package/dist/chunk-TEY6FAVZ.js +63 -0
- package/dist/google-genai-LMEZ62FB.cjs +10 -0
- package/dist/google-genai-T7I4FFIP.js +10 -0
- package/dist/google-genai.cjs +8 -0
- package/dist/google-genai.d.cts +7 -0
- package/dist/google-genai.d.ts +7 -0
- package/dist/google-genai.js +8 -0
- package/dist/index.cjs +24 -7
- package/dist/index.d.cts +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +23 -6
- package/dist/interrupt-7MWQCOY3.cjs +12 -0
- package/dist/{interrupt-AOYNN5AB.js → interrupt-KADNA6WK.js} +2 -2
- package/dist/{mcp-XIHWT2AU.js → mcp-EJNZYON6.js} +2 -2
- package/dist/{mcp-OKSS2R56.cjs → mcp-KAYXU4AU.cjs} +7 -7
- package/dist/preload.cjs +7 -7
- package/dist/preload.js +4 -4
- package/package.json +28 -10
- package/dist/interrupt-EMUUN3ER.cjs +0 -12
package/dist/index.cjs
CHANGED
|
@@ -33,17 +33,18 @@
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
var _chunkD27LNW3Mcjs = require('./chunk-D27LNW3M.cjs');
|
|
37
38
|
require('./chunk-UNLNNKZ7.cjs');
|
|
38
|
-
require('./chunk-
|
|
39
|
+
require('./chunk-HZOBDXDS.cjs');
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
45
|
-
require('./chunk-
|
|
46
|
-
require('./chunk-
|
|
46
|
+
require('./chunk-M3UGFLH7.cjs');
|
|
47
|
+
require('./chunk-NEF2O7HF.cjs');
|
|
47
48
|
require('./chunk-OBGZSXTJ.cjs');
|
|
48
49
|
|
|
49
50
|
// src/internal/instrumentation/auto-init.ts
|
|
@@ -93,7 +94,7 @@ function loadGenAIInstrumentations() {
|
|
|
93
94
|
function loadMCPInstrumentation() {
|
|
94
95
|
void (async () => {
|
|
95
96
|
try {
|
|
96
|
-
const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-
|
|
97
|
+
const { MCPInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./mcp-KAYXU4AU.cjs")));
|
|
97
98
|
const mcp = new MCPInstrumentation({ exceptionLogger });
|
|
98
99
|
_instrumentation.registerInstrumentations.call(void 0, { instrumentations: [mcp] });
|
|
99
100
|
_chunkWC573FCIcjs.logger.debug("Auto-loaded MCP instrumentation");
|
|
@@ -118,6 +119,20 @@ function loadVertexAIInstrumentation() {
|
|
|
118
119
|
}
|
|
119
120
|
})();
|
|
120
121
|
}
|
|
122
|
+
function loadGoogleGenAIInstrumentation() {
|
|
123
|
+
void (async () => {
|
|
124
|
+
try {
|
|
125
|
+
const { GoogleGenAIInstrumentation } = await Promise.resolve().then(() => _interopRequireWildcard(require("./google-genai-LMEZ62FB.cjs")));
|
|
126
|
+
const googleGenAI = new GoogleGenAIInstrumentation({ exceptionLogger });
|
|
127
|
+
_instrumentation.registerInstrumentations.call(void 0, { instrumentations: [googleGenAI] });
|
|
128
|
+
_chunkWC573FCIcjs.logger.debug("Auto-loaded Google GenAI instrumentation");
|
|
129
|
+
} catch (error) {
|
|
130
|
+
_chunkWC573FCIcjs.logger.debug(
|
|
131
|
+
`Google GenAI instrumentation not loaded (install @traceloop/instrumentation-google-generativeai if you want Gemini support): ${String(error)}`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
})();
|
|
135
|
+
}
|
|
121
136
|
function selectTelemetryRegister(ai) {
|
|
122
137
|
const register = _nullishCoalesce(ai.registerTelemetry, () => ( ai.registerTelemetryIntegration));
|
|
123
138
|
return typeof register === "function" ? register : void 0;
|
|
@@ -135,7 +150,7 @@ function loadVercelAITelemetry() {
|
|
|
135
150
|
}
|
|
136
151
|
const isV7 = typeof ai.registerTelemetry === "function";
|
|
137
152
|
const integrations = [];
|
|
138
|
-
const { createInterruptIntegration } = await Promise.resolve().then(() => _interopRequireWildcard(require("./interrupt-
|
|
153
|
+
const { createInterruptIntegration } = await Promise.resolve().then(() => _interopRequireWildcard(require("./interrupt-7MWQCOY3.cjs")));
|
|
139
154
|
integrations.push(createInterruptIntegration());
|
|
140
155
|
let otelCollectorLoaded = false;
|
|
141
156
|
try {
|
|
@@ -168,6 +183,7 @@ function autoInitializeInstrumentations() {
|
|
|
168
183
|
const genAIInstrumentations = loadGenAIInstrumentations();
|
|
169
184
|
loadMCPInstrumentation();
|
|
170
185
|
loadVertexAIInstrumentation();
|
|
186
|
+
loadGoogleGenAIInstrumentation();
|
|
171
187
|
loadVercelAITelemetry();
|
|
172
188
|
_chunkWC573FCIcjs.logger.info(
|
|
173
189
|
`Auto-initialization complete: ${genAIInstrumentations.length} GenAI instrumentations`
|
|
@@ -226,4 +242,5 @@ var init_exports = {};
|
|
|
226
242
|
|
|
227
243
|
|
|
228
244
|
|
|
229
|
-
|
|
245
|
+
|
|
246
|
+
exports.Brizz = _chunkD27LNW3Mcjs.Brizz; exports.DEFAULT_PII_PATTERNS = _chunkD27LNW3Mcjs.DEFAULT_PII_PATTERNS; exports.LogLevel = _chunkWC573FCIcjs.LogLevel; exports.Session = _chunkD27LNW3Mcjs.Session; exports.SessionTitle = _chunkD27LNW3Mcjs.SessionTitle; exports.SeverityNumber = _apilogs.SeverityNumber; exports.addExternalLink = _chunkD27LNW3Mcjs.addExternalLink; exports.callWithMessageId = _chunkD27LNW3Mcjs.callWithMessageId; exports.callWithMute = _chunkD27LNW3Mcjs.callWithMute; exports.callWithOrganization = _chunkD27LNW3Mcjs.callWithOrganization; exports.callWithProperties = _chunkD27LNW3Mcjs.callWithProperties; exports.callWithSessionId = _chunkD27LNW3Mcjs.callWithSessionId; exports.callWithUser = _chunkD27LNW3Mcjs.callWithUser; exports.detectRuntime = _chunkD27LNW3Mcjs.detectRuntime; exports.emitEvent = _chunkD27LNW3Mcjs.emitEvent; exports.emitEventWithSessionId = _chunkD27LNW3Mcjs.emitEventWithSessionId; exports.getActiveSession = _chunkD27LNW3Mcjs.getActiveSession; exports.getLogLevel = _chunkWC573FCIcjs.getLogLevel; exports.getMetricsExporter = _chunkD27LNW3Mcjs.getMetricsExporter; exports.getMetricsReader = _chunkD27LNW3Mcjs.getMetricsReader; exports.getSpanExporter = _chunkD27LNW3Mcjs.getSpanExporter; exports.getSpanProcessor = _chunkD27LNW3Mcjs.getSpanProcessor; exports.init = init_exports; exports.logger = _chunkWC573FCIcjs.logger; exports.maskAttributes = _chunkD27LNW3Mcjs.maskAttributes; exports.maskValue = _chunkD27LNW3Mcjs.maskValue; exports.recordFeedback = _chunkD27LNW3Mcjs.recordFeedback; exports.recordMetric = _chunkD27LNW3Mcjs.recordMetric; exports.setCurrentSpanCustomProperties = _chunkD27LNW3Mcjs.setCurrentSpanCustomProperties; exports.setLogLevel = _chunkWC573FCIcjs.setLogLevel; exports.setMessageId = _chunkD27LNW3Mcjs.setMessageId; exports.setOrganization = _chunkD27LNW3Mcjs.setOrganization; exports.setUser = _chunkD27LNW3Mcjs.setUser; exports.startSession = _chunkD27LNW3Mcjs.startSession; exports.startSessionTitle = _chunkD27LNW3Mcjs.startSessionTitle; exports.withMessageId = _chunkD27LNW3Mcjs.withMessageId; exports.withMute = _chunkD27LNW3Mcjs.withMute; exports.withOrganization = _chunkD27LNW3Mcjs.withOrganization; exports.withProperties = _chunkD27LNW3Mcjs.withProperties; exports.withSessionId = _chunkD27LNW3Mcjs.withSessionId; exports.withUser = _chunkD27LNW3Mcjs.withUser;
|
package/dist/index.d.cts
CHANGED
|
@@ -25,6 +25,7 @@ interface IInstrumentModules {
|
|
|
25
25
|
cohere?: unknown;
|
|
26
26
|
google_vertexai?: unknown;
|
|
27
27
|
google_aiplatform?: unknown;
|
|
28
|
+
google_genai?: unknown;
|
|
28
29
|
bedrock?: unknown;
|
|
29
30
|
pinecone?: unknown;
|
|
30
31
|
langchain?: {
|
|
@@ -249,7 +250,19 @@ declare function recordFeedback(type: string, options?: {
|
|
|
249
250
|
source?: string;
|
|
250
251
|
messageId?: string;
|
|
251
252
|
sessionId?: string;
|
|
252
|
-
|
|
253
|
+
attributes?: Record<string, string>;
|
|
254
|
+
}): void;
|
|
255
|
+
declare function recordMetric(options: {
|
|
256
|
+
name: string;
|
|
257
|
+
value: number | boolean;
|
|
258
|
+
unit?: string;
|
|
259
|
+
comment?: string;
|
|
260
|
+
attributes?: Record<string, string>;
|
|
261
|
+
polarity?: 'positive' | 'negative';
|
|
262
|
+
minValue?: number;
|
|
263
|
+
maxValue?: number;
|
|
264
|
+
timestamp?: Date;
|
|
265
|
+
sessionId?: string;
|
|
253
266
|
}): void;
|
|
254
267
|
declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
255
268
|
mode?: 'default' | 'title';
|
|
@@ -274,4 +287,4 @@ declare namespace init {
|
|
|
274
287
|
export { };
|
|
275
288
|
}
|
|
276
289
|
|
|
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 };
|
|
290
|
+
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, recordMetric, setCurrentSpanCustomProperties, setLogLevel, setMessageId, setOrganization, setUser, startSession, startSessionTitle, withMessageId, withMute, withOrganization, withProperties, withSessionId, withUser };
|
package/dist/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ interface IInstrumentModules {
|
|
|
25
25
|
cohere?: unknown;
|
|
26
26
|
google_vertexai?: unknown;
|
|
27
27
|
google_aiplatform?: unknown;
|
|
28
|
+
google_genai?: unknown;
|
|
28
29
|
bedrock?: unknown;
|
|
29
30
|
pinecone?: unknown;
|
|
30
31
|
langchain?: {
|
|
@@ -249,7 +250,19 @@ declare function recordFeedback(type: string, options?: {
|
|
|
249
250
|
source?: string;
|
|
250
251
|
messageId?: string;
|
|
251
252
|
sessionId?: string;
|
|
252
|
-
|
|
253
|
+
attributes?: Record<string, string>;
|
|
254
|
+
}): void;
|
|
255
|
+
declare function recordMetric(options: {
|
|
256
|
+
name: string;
|
|
257
|
+
value: number | boolean;
|
|
258
|
+
unit?: string;
|
|
259
|
+
comment?: string;
|
|
260
|
+
attributes?: Record<string, string>;
|
|
261
|
+
polarity?: 'positive' | 'negative';
|
|
262
|
+
minValue?: number;
|
|
263
|
+
maxValue?: number;
|
|
264
|
+
timestamp?: Date;
|
|
265
|
+
sessionId?: string;
|
|
253
266
|
}): void;
|
|
254
267
|
declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
255
268
|
mode?: 'default' | 'title';
|
|
@@ -274,4 +287,4 @@ declare namespace init {
|
|
|
274
287
|
export { };
|
|
275
288
|
}
|
|
276
289
|
|
|
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 };
|
|
290
|
+
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, recordMetric, setCurrentSpanCustomProperties, setLogLevel, setMessageId, setOrganization, setUser, startSession, startSessionTitle, withMessageId, withMute, withOrganization, withProperties, withSessionId, withUser };
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
maskAttributes,
|
|
22
22
|
maskValue,
|
|
23
23
|
recordFeedback,
|
|
24
|
+
recordMetric,
|
|
24
25
|
setCurrentSpanCustomProperties,
|
|
25
26
|
setMessageId,
|
|
26
27
|
setOrganization,
|
|
@@ -33,17 +34,17 @@ import {
|
|
|
33
34
|
withProperties,
|
|
34
35
|
withSessionId,
|
|
35
36
|
withUser
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-KP3KG66W.js";
|
|
37
38
|
import "./chunk-7SUF4VVI.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-GSKXPOLQ.js";
|
|
39
40
|
import {
|
|
40
41
|
LogLevel,
|
|
41
42
|
getLogLevel,
|
|
42
43
|
logger,
|
|
43
44
|
setLogLevel
|
|
44
45
|
} from "./chunk-Y4HNUX3Q.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-24CEDVD2.js";
|
|
47
|
+
import "./chunk-QY4VADPP.js";
|
|
47
48
|
import "./chunk-3RG5ZIWI.js";
|
|
48
49
|
|
|
49
50
|
// src/internal/instrumentation/auto-init.ts
|
|
@@ -93,7 +94,7 @@ function loadGenAIInstrumentations() {
|
|
|
93
94
|
function loadMCPInstrumentation() {
|
|
94
95
|
void (async () => {
|
|
95
96
|
try {
|
|
96
|
-
const { MCPInstrumentation } = await import("./mcp-
|
|
97
|
+
const { MCPInstrumentation } = await import("./mcp-EJNZYON6.js");
|
|
97
98
|
const mcp = new MCPInstrumentation({ exceptionLogger });
|
|
98
99
|
registerInstrumentations({ instrumentations: [mcp] });
|
|
99
100
|
logger.debug("Auto-loaded MCP instrumentation");
|
|
@@ -118,6 +119,20 @@ function loadVertexAIInstrumentation() {
|
|
|
118
119
|
}
|
|
119
120
|
})();
|
|
120
121
|
}
|
|
122
|
+
function loadGoogleGenAIInstrumentation() {
|
|
123
|
+
void (async () => {
|
|
124
|
+
try {
|
|
125
|
+
const { GoogleGenAIInstrumentation } = await import("./google-genai-T7I4FFIP.js");
|
|
126
|
+
const googleGenAI = new GoogleGenAIInstrumentation({ exceptionLogger });
|
|
127
|
+
registerInstrumentations({ instrumentations: [googleGenAI] });
|
|
128
|
+
logger.debug("Auto-loaded Google GenAI instrumentation");
|
|
129
|
+
} catch (error) {
|
|
130
|
+
logger.debug(
|
|
131
|
+
`Google GenAI instrumentation not loaded (install @traceloop/instrumentation-google-generativeai if you want Gemini support): ${String(error)}`
|
|
132
|
+
);
|
|
133
|
+
}
|
|
134
|
+
})();
|
|
135
|
+
}
|
|
121
136
|
function selectTelemetryRegister(ai) {
|
|
122
137
|
const register = ai.registerTelemetry ?? ai.registerTelemetryIntegration;
|
|
123
138
|
return typeof register === "function" ? register : void 0;
|
|
@@ -135,7 +150,7 @@ function loadVercelAITelemetry() {
|
|
|
135
150
|
}
|
|
136
151
|
const isV7 = typeof ai.registerTelemetry === "function";
|
|
137
152
|
const integrations = [];
|
|
138
|
-
const { createInterruptIntegration } = await import("./interrupt-
|
|
153
|
+
const { createInterruptIntegration } = await import("./interrupt-KADNA6WK.js");
|
|
139
154
|
integrations.push(createInterruptIntegration());
|
|
140
155
|
let otelCollectorLoaded = false;
|
|
141
156
|
try {
|
|
@@ -168,6 +183,7 @@ function autoInitializeInstrumentations() {
|
|
|
168
183
|
const genAIInstrumentations = loadGenAIInstrumentations();
|
|
169
184
|
loadMCPInstrumentation();
|
|
170
185
|
loadVertexAIInstrumentation();
|
|
186
|
+
loadGoogleGenAIInstrumentation();
|
|
171
187
|
loadVercelAITelemetry();
|
|
172
188
|
logger.info(
|
|
173
189
|
`Auto-initialization complete: ${genAIInstrumentations.length} GenAI instrumentations`
|
|
@@ -213,6 +229,7 @@ export {
|
|
|
213
229
|
maskAttributes,
|
|
214
230
|
maskValue,
|
|
215
231
|
recordFeedback,
|
|
232
|
+
recordMetric,
|
|
216
233
|
setCurrentSpanCustomProperties,
|
|
217
234
|
setLogLevel,
|
|
218
235
|
setMessageId,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunkM3UGFLH7cjs = require('./chunk-M3UGFLH7.cjs');
|
|
6
|
+
require('./chunk-NEF2O7HF.cjs');
|
|
7
|
+
require('./chunk-OBGZSXTJ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.InterruptPropagator = _chunkM3UGFLH7cjs.InterruptPropagator; exports._resetInterruptState = _chunkM3UGFLH7cjs._resetInterruptState; exports.createInterruptIntegration = _chunkM3UGFLH7cjs.createInterruptIntegration;
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
InterruptPropagator,
|
|
3
3
|
_resetInterruptState,
|
|
4
4
|
createInterruptIntegration
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-24CEDVD2.js";
|
|
6
|
+
import "./chunk-QY4VADPP.js";
|
|
7
7
|
import "./chunk-3RG5ZIWI.js";
|
|
8
8
|
export {
|
|
9
9
|
InterruptPropagator,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSDKVersion
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GSKXPOLQ.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-QY4VADPP.js";
|
|
12
12
|
import "./chunk-3RG5ZIWI.js";
|
|
13
13
|
|
|
14
14
|
// src/internal/instrumentation/mcp/instrumentation.ts
|
|
@@ -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 _chunkHZOBDXDScjs = require('./chunk-HZOBDXDS.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 _chunkNEF2O7HFcjs = require('./chunk-NEF2O7HF.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(`${_chunkNEF2O7HFcjs.BRIZZ}.${_chunkNEF2O7HFcjs.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(_chunkNEF2O7HFcjs.PROPERTIES_CONTEXT_KEY);
|
|
151
|
+
const merged = prev ? { ...prev, [_chunkNEF2O7HFcjs.SESSION_ID]: sessionId } : { [_chunkNEF2O7HFcjs.SESSION_ID]: sessionId };
|
|
152
152
|
return {
|
|
153
|
-
context: baseContext.setValue(
|
|
153
|
+
context: baseContext.setValue(_chunkNEF2O7HFcjs.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 = _chunkHZOBDXDScjs.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";
|
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 _chunkD27LNW3Mcjs = require('./chunk-D27LNW3M.cjs');
|
|
5
5
|
require('./chunk-UNLNNKZ7.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-HZOBDXDS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-M3UGFLH7.cjs');
|
|
12
|
+
require('./chunk-NEF2O7HF.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 = _chunkD27LNW3Mcjs.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
|
+
_chunkD27LNW3Mcjs.Brizz.initialize({ logLevel, disableNodeSdk: false });
|
|
107
107
|
} else {
|
|
108
|
-
|
|
108
|
+
_chunkD27LNW3Mcjs.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-KP3KG66W.js";
|
|
5
5
|
import "./chunk-7SUF4VVI.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-GSKXPOLQ.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-24CEDVD2.js";
|
|
12
|
+
import "./chunk-QY4VADPP.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.35",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenTelemetry-based observability SDK for AI applications",
|
|
6
6
|
"keywords": [
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"format": "prettier --write .",
|
|
45
45
|
"format:check": "prettier --check .",
|
|
46
46
|
"type-check": "tsc --noEmit",
|
|
47
|
+
"type-check:ts7": "node ./node_modules/typescript-7/bin/tsc --noEmit",
|
|
47
48
|
"prepublishOnly": "pnpm run build",
|
|
48
49
|
"clean": "rm -rf dist coverage *.tsbuildinfo .cache",
|
|
49
50
|
"clean:all": "pnpm run clean && rm -rf node_modules pnpm-lock.yaml",
|
|
@@ -78,6 +79,16 @@
|
|
|
78
79
|
"default": "./dist/eve.cjs"
|
|
79
80
|
}
|
|
80
81
|
},
|
|
82
|
+
"./google-genai": {
|
|
83
|
+
"import": {
|
|
84
|
+
"types": "./dist/google-genai.d.ts",
|
|
85
|
+
"default": "./dist/google-genai.js"
|
|
86
|
+
},
|
|
87
|
+
"require": {
|
|
88
|
+
"types": "./dist/google-genai.d.cts",
|
|
89
|
+
"default": "./dist/google-genai.cjs"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
81
92
|
"./preload": {
|
|
82
93
|
"import": "./dist/preload.js",
|
|
83
94
|
"require": "./dist/preload.cjs"
|
|
@@ -95,32 +106,35 @@
|
|
|
95
106
|
"registry": "https://registry.npmjs.org/"
|
|
96
107
|
},
|
|
97
108
|
"devDependencies": {
|
|
98
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
99
|
-
"@ai-sdk/openai": "^4.0.
|
|
100
|
-
"@ai-sdk/otel": "^1.0.
|
|
109
|
+
"@ai-sdk/anthropic": "^4.0.12",
|
|
110
|
+
"@ai-sdk/openai": "^4.0.11",
|
|
111
|
+
"@ai-sdk/otel": "^1.0.22",
|
|
101
112
|
"@arizeai/openinference-instrumentation-mcp": "^0.2.20",
|
|
102
113
|
"@changesets/changelog-github": "^0.7.0",
|
|
103
114
|
"@changesets/cli": "^2.30.0",
|
|
104
115
|
"@eslint/js": "^10.0.1",
|
|
116
|
+
"@google/genai": "^2.11.0",
|
|
105
117
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
118
|
+
"@traceloop/instrumentation-google-generativeai": "^0.27.0",
|
|
106
119
|
"@traceloop/instrumentation-vertexai": "^0.27.0",
|
|
107
120
|
"@types/jest": "^30.0.0",
|
|
108
|
-
"@types/node": "^26.1.
|
|
121
|
+
"@types/node": "^26.1.1",
|
|
109
122
|
"@typescript-eslint/eslint-plugin": "^8.63.0",
|
|
110
123
|
"@typescript-eslint/parser": "^8.63.0",
|
|
111
|
-
"ai": "^7.0.
|
|
112
|
-
"eslint": "^10.
|
|
124
|
+
"ai": "^7.0.22",
|
|
125
|
+
"eslint": "^10.7.0",
|
|
113
126
|
"eslint-config-prettier": "^10.1.8",
|
|
114
127
|
"eslint-plugin-import": "^2.32.0",
|
|
115
128
|
"eslint-plugin-promise": "^7.3.0",
|
|
116
129
|
"eslint-plugin-unicorn": "^71.1.0",
|
|
117
130
|
"jest": "^30.4.2",
|
|
118
131
|
"jest-environment-jsdom": "^30.4.1",
|
|
119
|
-
"openai": "^6.
|
|
120
|
-
"prettier": "^3.9.
|
|
132
|
+
"openai": "^6.46.0",
|
|
133
|
+
"prettier": "^3.9.5",
|
|
121
134
|
"ts-jest": "^29.4.11",
|
|
122
135
|
"tsup": "^8.5.1",
|
|
123
136
|
"typescript": "^6.0.3",
|
|
137
|
+
"typescript-7": "npm:typescript@^7.0.2",
|
|
124
138
|
"vitest": "^4.1.10",
|
|
125
139
|
"zod": "^4.4.3"
|
|
126
140
|
},
|
|
@@ -129,6 +143,7 @@
|
|
|
129
143
|
"@arizeai/openinference-instrumentation-mcp": "^0.2.19",
|
|
130
144
|
"@langchain/core": "^0.3.0 || ^1.0.0",
|
|
131
145
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
146
|
+
"@traceloop/instrumentation-google-generativeai": "^0.27.0",
|
|
132
147
|
"@traceloop/instrumentation-vertexai": "^0.27.0",
|
|
133
148
|
"ai": "*",
|
|
134
149
|
"typescript": ">=5.0.0"
|
|
@@ -146,6 +161,9 @@
|
|
|
146
161
|
"@modelcontextprotocol/sdk": {
|
|
147
162
|
"optional": true
|
|
148
163
|
},
|
|
164
|
+
"@traceloop/instrumentation-google-generativeai": {
|
|
165
|
+
"optional": true
|
|
166
|
+
},
|
|
149
167
|
"@traceloop/instrumentation-vertexai": {
|
|
150
168
|
"optional": true
|
|
151
169
|
},
|
|
@@ -171,7 +189,7 @@
|
|
|
171
189
|
"@opentelemetry/sdk-metrics": "^2.9.0",
|
|
172
190
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
173
191
|
"@opentelemetry/sdk-trace-node": "^2.9.0",
|
|
174
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
192
|
+
"@opentelemetry/semantic-conventions": "^1.43.0",
|
|
175
193
|
"@traceloop/ai-semantic-conventions": "^0.27.0",
|
|
176
194
|
"@traceloop/instrumentation-anthropic": "^0.27.0",
|
|
177
195
|
"@traceloop/instrumentation-bedrock": "^0.27.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|