@brizz/sdk 0.1.46 → 0.1.48
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 +20 -5
- package/dist/{chunk-APOYOP7D.js → chunk-3OMB2F7B.js} +1 -1
- package/dist/{chunk-3IGBYXLR.cjs → chunk-ELLCNMLI.cjs} +4 -4
- package/dist/{chunk-AOT5NJDV.js → chunk-FVVRWMPV.js} +2 -0
- package/dist/{chunk-5WBPX342.cjs → chunk-GMZQ6N77.cjs} +3 -1
- package/dist/{chunk-VFWTFL7E.cjs → chunk-JDJLJ2V2.cjs} +8 -8
- package/dist/{chunk-USYGGHMA.js → chunk-L4P4RJT5.js} +2 -2
- package/dist/index.cjs +192 -151
- package/dist/index.js +65 -24
- package/dist/{interrupt-A6O7N72X.js → interrupt-YO3ID433.js} +2 -2
- package/dist/interrupt-YQHEXVES.cjs +12 -0
- package/dist/{mcp-M3WRCR7G.cjs → mcp-3E34LCRM.cjs} +12 -12
- package/dist/{mcp-YHBVF7QU.js → mcp-RLTZLXHY.js} +2 -2
- package/dist/types/cjs/internal/semantic-conventions.d.ts +1 -0
- package/dist/types/cjs/internal/trace/session.d.ts +2 -0
- package/dist/types/esm/internal/semantic-conventions.d.ts +1 -0
- package/dist/types/esm/internal/trace/session.d.ts +2 -0
- package/package.json +21 -20
- package/dist/interrupt-IKOUBQGN.cjs +0 -12
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
configure,
|
|
7
7
|
getSDKVersion
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L4P4RJT5.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_LOG_LEVEL,
|
|
11
11
|
LogLevel,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from "./chunk-Y4HNUX3Q.js";
|
|
17
17
|
import {
|
|
18
18
|
InterruptPropagator
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3OMB2F7B.js";
|
|
20
20
|
import {
|
|
21
21
|
AGENT_ID,
|
|
22
22
|
AGENT_NAME,
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
METRIC_POLARITY_NEGATIVE,
|
|
46
46
|
METRIC_POLARITY_POSITIVE,
|
|
47
47
|
METRIC_TIMESTAMP,
|
|
48
|
+
METRIC_TRACE_ID,
|
|
48
49
|
METRIC_UNIT,
|
|
49
50
|
METRIC_VALUE,
|
|
50
51
|
MUTE_INPUT,
|
|
@@ -73,7 +74,7 @@ import {
|
|
|
73
74
|
USER_NAME,
|
|
74
75
|
USER_PLAN,
|
|
75
76
|
USER_ROLE
|
|
76
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-FVVRWMPV.js";
|
|
77
78
|
import {
|
|
78
79
|
__require
|
|
79
80
|
} from "./chunk-3RG5ZIWI.js";
|
|
@@ -418,7 +419,7 @@ function loadGenAIInstrumentations() {
|
|
|
418
419
|
function loadMCPInstrumentation() {
|
|
419
420
|
void (async () => {
|
|
420
421
|
try {
|
|
421
|
-
const { MCPInstrumentation } = await import("./mcp-
|
|
422
|
+
const { MCPInstrumentation } = await import("./mcp-RLTZLXHY.js");
|
|
422
423
|
const mcp = new MCPInstrumentation({ exceptionLogger });
|
|
423
424
|
registerInstrumentations({ instrumentations: [mcp] });
|
|
424
425
|
logger.debug("Auto-loaded MCP instrumentation");
|
|
@@ -482,7 +483,7 @@ function loadVercelAITelemetry() {
|
|
|
482
483
|
}
|
|
483
484
|
const isV7 = typeof ai.registerTelemetry === "function";
|
|
484
485
|
const integrations = [];
|
|
485
|
-
const { createInterruptIntegration } = await import("./interrupt-
|
|
486
|
+
const { createInterruptIntegration } = await import("./interrupt-YO3ID433.js");
|
|
486
487
|
integrations.push(createInterruptIntegration());
|
|
487
488
|
let otelCollectorLoaded = false;
|
|
488
489
|
try {
|
|
@@ -693,6 +694,7 @@ import { QdrantInstrumentation as QdrantInstrumentation2 } from "@traceloop/inst
|
|
|
693
694
|
import { TogetherInstrumentation as TogetherInstrumentation2 } from "@traceloop/instrumentation-together";
|
|
694
695
|
|
|
695
696
|
// src/internal/instrumentation/langchain.ts
|
|
697
|
+
import { createRequire } from "module";
|
|
696
698
|
import { context as context2 } from "@opentelemetry/api";
|
|
697
699
|
var SCOPE_NAME = "@arizeai/openinference-instrumentation-langchain";
|
|
698
700
|
var PATCHED_MARKER = /* @__PURE__ */ Symbol.for("brizz.langchain.callbackManagerPatched");
|
|
@@ -751,6 +753,12 @@ function patchInstalledCallbackManager() {
|
|
|
751
753
|
} catch (error) {
|
|
752
754
|
logger.debug(`LangChain callback manager not patched: ${String(error)}`);
|
|
753
755
|
}
|
|
756
|
+
try {
|
|
757
|
+
const requireFromSdk = createRequire(import.meta.url);
|
|
758
|
+
patchCallbackManagerModule(requireFromSdk("@langchain/core/callbacks/manager"));
|
|
759
|
+
} catch (error) {
|
|
760
|
+
logger.debug(`LangChain CJS callback manager not patched: ${String(error)}`);
|
|
761
|
+
}
|
|
754
762
|
})();
|
|
755
763
|
}
|
|
756
764
|
function restampLangChainSpan(span) {
|
|
@@ -907,7 +915,7 @@ var InstrumentationRegistry = class _InstrumentationRegistry {
|
|
|
907
915
|
const mcpModules = this.manualModules.mcp;
|
|
908
916
|
void (async () => {
|
|
909
917
|
try {
|
|
910
|
-
const { MCPInstrumentation } = await import("./mcp-
|
|
918
|
+
const { MCPInstrumentation } = await import("./mcp-RLTZLXHY.js");
|
|
911
919
|
const instrumentation = new MCPInstrumentation({ exceptionLogger: exceptionLogger2 });
|
|
912
920
|
instrumentation.manuallyInstrument(mcpModules);
|
|
913
921
|
logger.debug("Manual instrumentation enabled for MCP");
|
|
@@ -1052,22 +1060,23 @@ function setSessionId(id) {
|
|
|
1052
1060
|
propagatePropertiesImperatively(properties);
|
|
1053
1061
|
}
|
|
1054
1062
|
var SERVICE_NAME_MAX_BYTES = 256;
|
|
1055
|
-
function
|
|
1063
|
+
function serviceNameProblem(name) {
|
|
1056
1064
|
if (typeof name !== "string" || name === "") {
|
|
1057
|
-
|
|
1058
|
-
return {};
|
|
1065
|
+
return "must be a non-empty string";
|
|
1059
1066
|
}
|
|
1060
1067
|
if (/[\r\n\0]/.test(name)) {
|
|
1061
|
-
|
|
1062
|
-
`Service name ${JSON.stringify(name)} contains CR, LF, or NUL; keeping the configured appName.`
|
|
1063
|
-
);
|
|
1064
|
-
return {};
|
|
1068
|
+
return `${JSON.stringify(name)} contains CR, LF, or NUL`;
|
|
1065
1069
|
}
|
|
1066
1070
|
const byteLength = new globalThis.TextEncoder().encode(name).length;
|
|
1067
1071
|
if (byteLength > SERVICE_NAME_MAX_BYTES) {
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1072
|
+
return `is ${byteLength} bytes, over the ${SERVICE_NAME_MAX_BYTES}-byte limit`;
|
|
1073
|
+
}
|
|
1074
|
+
return void 0;
|
|
1075
|
+
}
|
|
1076
|
+
function serviceNameProperties(name) {
|
|
1077
|
+
const problem = serviceNameProblem(name);
|
|
1078
|
+
if (problem !== void 0) {
|
|
1079
|
+
logger.warn(`Service name ${problem}; keeping the configured appName.`);
|
|
1071
1080
|
return {};
|
|
1072
1081
|
}
|
|
1073
1082
|
return { [SERVICE_NAME]: name };
|
|
@@ -1450,6 +1459,13 @@ function recordMetricImpl(options) {
|
|
|
1450
1459
|
);
|
|
1451
1460
|
return;
|
|
1452
1461
|
}
|
|
1462
|
+
if (options.serviceName !== void 0) {
|
|
1463
|
+
const problem = serviceNameProblem(options.serviceName);
|
|
1464
|
+
if (problem !== void 0) {
|
|
1465
|
+
logger.warn(`recordMetric(${name}) service name ${problem}; metric dropped.`);
|
|
1466
|
+
return;
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1453
1469
|
const eventAttributes = {
|
|
1454
1470
|
[METRIC_NAME]: name,
|
|
1455
1471
|
[METRIC_VALUE]: numericValue
|
|
@@ -1519,16 +1535,32 @@ function recordMetricImpl(options) {
|
|
|
1519
1535
|
accepted += 1;
|
|
1520
1536
|
}
|
|
1521
1537
|
}
|
|
1522
|
-
const
|
|
1523
|
-
if (
|
|
1538
|
+
const traceId = typeof options.traceId === "string" && options.traceId !== "" ? options.traceId : void 0;
|
|
1539
|
+
if (traceId !== void 0) {
|
|
1540
|
+
eventAttributes[METRIC_TRACE_ID] = traceId;
|
|
1541
|
+
}
|
|
1542
|
+
const sessionId = options.sessionId ?? (traceId === void 0 ? resolveSessionIdFromContext() : void 0);
|
|
1543
|
+
if (sessionId === void 0 && traceId === void 0) {
|
|
1524
1544
|
logger.warn(
|
|
1525
|
-
`recordMetric(${name}) called with no resolvable session id; the metric cannot be attributed to a conversation and is dropped. Pass options.sessionId or call inside a startSession/callWithSessionId scope.`
|
|
1545
|
+
`recordMetric(${name}) called with no resolvable session id or trace id; the metric cannot be attributed to a conversation and is dropped. Pass options.sessionId or options.traceId, or call inside a startSession/callWithSessionId scope.`
|
|
1526
1546
|
);
|
|
1527
1547
|
return;
|
|
1528
1548
|
}
|
|
1549
|
+
const base = context3.active();
|
|
1550
|
+
const ambient = base.getValue(PROPERTIES_CONTEXT_KEY);
|
|
1551
|
+
const properties = { ...ambient };
|
|
1552
|
+
if (sessionId === void 0) {
|
|
1553
|
+
delete properties[SESSION_ID];
|
|
1554
|
+
delete properties[MESSAGE_ID];
|
|
1555
|
+
} else {
|
|
1556
|
+
properties[SESSION_ID] = sessionId;
|
|
1557
|
+
}
|
|
1558
|
+
if (options.serviceName !== void 0) {
|
|
1559
|
+
properties[SERVICE_NAME] = options.serviceName;
|
|
1560
|
+
}
|
|
1529
1561
|
try {
|
|
1530
|
-
|
|
1531
|
-
|
|
1562
|
+
context3.with(
|
|
1563
|
+
base.setValue(PROPERTIES_CONTEXT_KEY, properties),
|
|
1532
1564
|
() => emitEvent(METRIC_EVENT_NAME, eventAttributes)
|
|
1533
1565
|
);
|
|
1534
1566
|
} catch (error) {
|
|
@@ -2154,7 +2186,16 @@ var LoggingModule = class _LoggingModule {
|
|
|
2154
2186
|
createLogExporter(config, serviceName) {
|
|
2155
2187
|
if (config.customLogExporter) {
|
|
2156
2188
|
logger.debug("Using custom log exporter");
|
|
2157
|
-
|
|
2189
|
+
if (serviceName === config.appName) {
|
|
2190
|
+
return config.customLogExporter;
|
|
2191
|
+
}
|
|
2192
|
+
const shared = config.customLogExporter;
|
|
2193
|
+
return {
|
|
2194
|
+
export: (logs, resultCallback) => shared.export(logs, resultCallback),
|
|
2195
|
+
forceFlush: async () => shared.forceFlush(),
|
|
2196
|
+
shutdown: async () => {
|
|
2197
|
+
}
|
|
2198
|
+
};
|
|
2158
2199
|
}
|
|
2159
2200
|
const logsUrl = config.baseUrl.replace(/\/$/, "") + "/v1/logs";
|
|
2160
2201
|
logger.debug("Initializing default OTLP log exporter", { url: logsUrl, serviceName });
|
|
@@ -2280,12 +2321,12 @@ var LoggingModule = class _LoggingModule {
|
|
|
2280
2321
|
*/
|
|
2281
2322
|
async shutdown() {
|
|
2282
2323
|
logger.debug("Shutting down logging module");
|
|
2324
|
+
await Promise.all([...this.scopedProviders.values()].map(async (p) => p.shutdown()));
|
|
2325
|
+
this.scopedProviders.clear();
|
|
2283
2326
|
if (this.loggerProvider) {
|
|
2284
2327
|
await this.loggerProvider.shutdown();
|
|
2285
2328
|
this.loggerProvider = null;
|
|
2286
2329
|
}
|
|
2287
|
-
await Promise.all([...this.scopedProviders.values()].map(async (p) => p.shutdown()));
|
|
2288
|
-
this.scopedProviders.clear();
|
|
2289
2330
|
this.config = null;
|
|
2290
2331
|
if (_LoggingModule.instance === this) {
|
|
2291
2332
|
_LoggingModule.instance = null;
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
InterruptPropagator,
|
|
3
3
|
_resetInterruptState,
|
|
4
4
|
createInterruptIntegration
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-3OMB2F7B.js";
|
|
6
|
+
import "./chunk-FVVRWMPV.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 _chunkELLCNMLIcjs = require('./chunk-ELLCNMLI.cjs');
|
|
6
|
+
require('./chunk-GMZQ6N77.cjs');
|
|
7
|
+
require('./chunk-OBGZSXTJ.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
exports.InterruptPropagator = _chunkELLCNMLIcjs.InterruptPropagator; exports._resetInterruptState = _chunkELLCNMLIcjs._resetInterruptState; exports.createInterruptIntegration = _chunkELLCNMLIcjs.createInterruptIntegration;
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkJDJLJ2V2cjs = require('./chunk-JDJLJ2V2.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
var _chunkWC573FCIcjs = require('./chunk-WC573FCI.cjs');
|
|
15
|
-
require('./chunk-
|
|
15
|
+
require('./chunk-GMZQ6N77.cjs');
|
|
16
16
|
require('./chunk-OBGZSXTJ.cjs');
|
|
17
17
|
|
|
18
18
|
// src/internal/instrumentation/mcp/instrumentation.ts
|
|
@@ -387,14 +387,14 @@ function wrapOnRequest(original, tracer) {
|
|
|
387
387
|
return original.apply(this, args);
|
|
388
388
|
}
|
|
389
389
|
const method = request.method;
|
|
390
|
-
if (method === METHOD_TOOLS_CALL &&
|
|
390
|
+
if (method === METHOD_TOOLS_CALL && _chunkJDJLJ2V2cjs.isSessionToolCall.call(void 0, request)) {
|
|
391
391
|
return answerSessionToolCall(this, request, tracer, args, original);
|
|
392
392
|
}
|
|
393
393
|
const handler = _nullishCoalesce(handlers.get(method), () => ( this.fallbackRequestHandler));
|
|
394
394
|
if (!handler) {
|
|
395
395
|
return original.apply(this, args);
|
|
396
396
|
}
|
|
397
|
-
const tracking =
|
|
397
|
+
const tracking = _chunkJDJLJ2V2cjs.isEnabled.call(void 0, ) && method === METHOD_TOOLS_CALL ? _chunkJDJLJ2V2cjs.popTrackingArguments.call(void 0, request) : {};
|
|
398
398
|
const started = safeStartServerSpan(tracer, request, this, tracking);
|
|
399
399
|
if (!started) {
|
|
400
400
|
return original.apply(this, args);
|
|
@@ -404,9 +404,9 @@ function wrapOnRequest(original, tracer) {
|
|
|
404
404
|
if (method === METHOD_TOOLS_LIST) {
|
|
405
405
|
hooks.onResult = (result) => {
|
|
406
406
|
let advertised = result;
|
|
407
|
-
if (
|
|
407
|
+
if (_chunkJDJLJ2V2cjs.isEnabled.call(void 0, )) {
|
|
408
408
|
try {
|
|
409
|
-
advertised =
|
|
409
|
+
advertised = _chunkJDJLJ2V2cjs.patchListToolsResult.call(void 0, result);
|
|
410
410
|
} catch (error) {
|
|
411
411
|
_chunkWC573FCIcjs.logger.warn(
|
|
412
412
|
`Brizz MCP: failed to patch tools/list schemas: ${String(error)}`
|
|
@@ -417,7 +417,7 @@ function wrapOnRequest(original, tracer) {
|
|
|
417
417
|
try {
|
|
418
418
|
emitSchemaSpansFromListResponse(
|
|
419
419
|
advertised,
|
|
420
|
-
|
|
420
|
+
_chunkJDJLJ2V2cjs.resolveTransportSessionId.call(void 0, this),
|
|
421
421
|
tracer
|
|
422
422
|
);
|
|
423
423
|
} catch (error) {
|
|
@@ -430,7 +430,7 @@ function wrapOnRequest(original, tracer) {
|
|
|
430
430
|
}
|
|
431
431
|
if (method !== METHOD_TOOLS_CALL) {
|
|
432
432
|
hooks.onError = () => {
|
|
433
|
-
|
|
433
|
+
_chunkJDJLJ2V2cjs.stampAndPropagateSession.call(void 0, span, _chunkJDJLJ2V2cjs.resolveSessionId.call(void 0, this, spanCtx), spanCtx);
|
|
434
434
|
};
|
|
435
435
|
}
|
|
436
436
|
const wrappedHandler = (req, extra) => _api.context.with(
|
|
@@ -464,7 +464,7 @@ function answerSessionToolCall(protocol, request, tracer, args, original) {
|
|
|
464
464
|
if (!handlers) {
|
|
465
465
|
return original.apply(protocol, args);
|
|
466
466
|
}
|
|
467
|
-
const { id, result } =
|
|
467
|
+
const { id, result } = _chunkJDJLJ2V2cjs.sessionToolResult.call(void 0, );
|
|
468
468
|
const started = safeStartServerSpan(tracer, request, protocol, { sessionId: id });
|
|
469
469
|
const handler = () => started ? _api.context.with(started.spanCtx, () => result) : result;
|
|
470
470
|
const hadEntry = handlers.has(METHOD_TOOLS_CALL);
|
|
@@ -554,8 +554,8 @@ function safeStartServerSpan(tracer, request, protocol, tracking = {}) {
|
|
|
554
554
|
parentCtx
|
|
555
555
|
);
|
|
556
556
|
applyServerRequestAttributes(span, request, protocol);
|
|
557
|
-
const resolved = request.method === METHOD_TOOLS_CALL ? _nullishCoalesce(tracking.sessionId, () => (
|
|
558
|
-
const { context: sessCtx } =
|
|
557
|
+
const resolved = request.method === METHOD_TOOLS_CALL ? _nullishCoalesce(tracking.sessionId, () => ( _chunkJDJLJ2V2cjs.resolveSessionId.call(void 0, protocol, parentCtx))) : void 0;
|
|
558
|
+
const { context: sessCtx } = _chunkJDJLJ2V2cjs.stampAndPropagateSession.call(void 0,
|
|
559
559
|
span,
|
|
560
560
|
resolved,
|
|
561
561
|
parentCtx,
|
|
@@ -611,7 +611,7 @@ function safeEnd(span) {
|
|
|
611
611
|
|
|
612
612
|
// src/internal/instrumentation/mcp/version.ts
|
|
613
613
|
var INSTRUMENTATION_NAME = "@brizz/sdk/mcp";
|
|
614
|
-
var INSTRUMENTATION_VERSION =
|
|
614
|
+
var INSTRUMENTATION_VERSION = _chunkJDJLJ2V2cjs.getSDKVersion.call(void 0, );
|
|
615
615
|
|
|
616
616
|
// src/internal/instrumentation/mcp/instrumentation.ts
|
|
617
617
|
var PROTOCOL_MODULE_NAME = "@modelcontextprotocol/sdk/shared/protocol.js";
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
resolveTransportSessionId,
|
|
9
9
|
sessionToolResult,
|
|
10
10
|
stampAndPropagateSession
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-L4P4RJT5.js";
|
|
12
12
|
import {
|
|
13
13
|
logger
|
|
14
14
|
} from "./chunk-Y4HNUX3Q.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-FVVRWMPV.js";
|
|
16
16
|
import "./chunk-3RG5ZIWI.js";
|
|
17
17
|
|
|
18
18
|
// src/internal/instrumentation/mcp/instrumentation.ts
|
|
@@ -53,6 +53,7 @@ export declare const METRIC_POLARITY = "brizz.internal.metric.polarity";
|
|
|
53
53
|
export declare const METRIC_MIN = "brizz.internal.metric.min";
|
|
54
54
|
export declare const METRIC_MAX = "brizz.internal.metric.max";
|
|
55
55
|
export declare const METRIC_TIMESTAMP = "brizz.internal.metric.timestamp";
|
|
56
|
+
export declare const METRIC_TRACE_ID = "brizz.internal.metric.trace_id";
|
|
56
57
|
export declare const METRIC_ATTRIBUTE_PREFIX = "brizz.internal.metric.attribute.";
|
|
57
58
|
export declare const RESERVED_METRIC_NAMES: Set<string>;
|
|
58
59
|
export declare const METRIC_POLARITY_POSITIVE = "positive";
|
|
@@ -132,6 +132,8 @@ export declare function recordMetric(options: {
|
|
|
132
132
|
maxValue?: number;
|
|
133
133
|
timestamp?: Date;
|
|
134
134
|
sessionId?: string;
|
|
135
|
+
traceId?: string;
|
|
136
|
+
serviceName?: string;
|
|
135
137
|
}): void;
|
|
136
138
|
export declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
137
139
|
mode?: 'default' | 'title';
|
|
@@ -53,6 +53,7 @@ export declare const METRIC_POLARITY = "brizz.internal.metric.polarity";
|
|
|
53
53
|
export declare const METRIC_MIN = "brizz.internal.metric.min";
|
|
54
54
|
export declare const METRIC_MAX = "brizz.internal.metric.max";
|
|
55
55
|
export declare const METRIC_TIMESTAMP = "brizz.internal.metric.timestamp";
|
|
56
|
+
export declare const METRIC_TRACE_ID = "brizz.internal.metric.trace_id";
|
|
56
57
|
export declare const METRIC_ATTRIBUTE_PREFIX = "brizz.internal.metric.attribute.";
|
|
57
58
|
export declare const RESERVED_METRIC_NAMES: Set<string>;
|
|
58
59
|
export declare const METRIC_POLARITY_POSITIVE = "positive";
|
|
@@ -132,6 +132,8 @@ export declare function recordMetric(options: {
|
|
|
132
132
|
maxValue?: number;
|
|
133
133
|
timestamp?: Date;
|
|
134
134
|
sessionId?: string;
|
|
135
|
+
traceId?: string;
|
|
136
|
+
serviceName?: string;
|
|
135
137
|
}): void;
|
|
136
138
|
export declare function startSession<T>(sessionId: string, callback: (session: Session) => T, extraProperties?: Record<string, AttributeValue>, options?: {
|
|
137
139
|
mode?: 'default' | 'title';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brizz/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenTelemetry-based observability SDK for AI applications",
|
|
6
6
|
"keywords": [
|
|
@@ -102,35 +102,36 @@
|
|
|
102
102
|
"registry": "https://registry.npmjs.org/"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@ai-sdk/anthropic": "^4.0.
|
|
106
|
-
"@ai-sdk/openai": "^4.0.
|
|
107
|
-
"@ai-sdk/otel": "^1.0.
|
|
105
|
+
"@ai-sdk/anthropic": "^4.0.58",
|
|
106
|
+
"@ai-sdk/openai": "^4.0.71",
|
|
107
|
+
"@ai-sdk/otel": "^1.0.107",
|
|
108
108
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
109
|
-
"@arizeai/openinference-instrumentation-mcp": "^0.2.
|
|
110
|
-
"@babel/core": "^8.0.
|
|
111
|
-
"@babel/preset-env": "^8.0.
|
|
109
|
+
"@arizeai/openinference-instrumentation-mcp": "^0.2.33",
|
|
110
|
+
"@babel/core": "^8.0.6",
|
|
111
|
+
"@babel/preset-env": "^8.0.6",
|
|
112
112
|
"@babel/preset-typescript": "^8.0.1",
|
|
113
113
|
"@changesets/changelog-github": "^1.0.1",
|
|
114
|
-
"@changesets/cli": "^3.0.
|
|
115
|
-
"@google/genai": "^2.
|
|
114
|
+
"@changesets/cli": "^3.0.3",
|
|
115
|
+
"@google/genai": "^2.23.0",
|
|
116
116
|
"@langchain/core": "^1.2.11",
|
|
117
117
|
"@langchain/langgraph": "^1.4.15",
|
|
118
118
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
119
119
|
"@traceloop/instrumentation-google-generativeai": "^0.27.0",
|
|
120
120
|
"@traceloop/instrumentation-vertexai": "^0.27.0",
|
|
121
121
|
"@types/jest": "^30.0.0",
|
|
122
|
-
"@types/node": "^26.
|
|
123
|
-
"ai": "^7.0.
|
|
124
|
-
"babel-jest": "^30.5.
|
|
125
|
-
"
|
|
126
|
-
"jest
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
122
|
+
"@types/node": "^26.6.2",
|
|
123
|
+
"ai": "^7.0.107",
|
|
124
|
+
"babel-jest": "^30.5.2",
|
|
125
|
+
"babel-plugin-transform-import-meta": "^3.0.0",
|
|
126
|
+
"jest": "^30.5.2",
|
|
127
|
+
"jest-environment-jsdom": "^30.5.2",
|
|
128
|
+
"openai": "^7.20.0",
|
|
129
|
+
"oxlint": "^1.83.0",
|
|
130
|
+
"prettier": "^3.9.8",
|
|
130
131
|
"tsup": "^8.5.1",
|
|
131
132
|
"typescript": "^7.0.2",
|
|
132
|
-
"vitest": "^5.0.
|
|
133
|
-
"zod": "^4.5
|
|
133
|
+
"vitest": "^5.0.1",
|
|
134
|
+
"zod": "^4.6.5"
|
|
134
135
|
},
|
|
135
136
|
"peerDependencies": {
|
|
136
137
|
"@ai-sdk/otel": "^1",
|
|
@@ -173,7 +174,7 @@
|
|
|
173
174
|
}
|
|
174
175
|
},
|
|
175
176
|
"dependencies": {
|
|
176
|
-
"@arizeai/openinference-instrumentation-langchain": "^4.
|
|
177
|
+
"@arizeai/openinference-instrumentation-langchain": "^4.1.1",
|
|
177
178
|
"@arizeai/openinference-instrumentation-openai": "^2.3.1",
|
|
178
179
|
"@opentelemetry/api": "^1.9.0",
|
|
179
180
|
"@opentelemetry/api-logs": "^0.222.0",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var _chunk3IGBYXLRcjs = require('./chunk-3IGBYXLR.cjs');
|
|
6
|
-
require('./chunk-5WBPX342.cjs');
|
|
7
|
-
require('./chunk-OBGZSXTJ.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
exports.InterruptPropagator = _chunk3IGBYXLRcjs.InterruptPropagator; exports._resetInterruptState = _chunk3IGBYXLRcjs._resetInterruptState; exports.createInterruptIntegration = _chunk3IGBYXLRcjs.createInterruptIntegration;
|