braintrust 3.26.0 → 3.27.0
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/dev/dist/index.js +2440 -1067
- package/dev/dist/index.mjs +1644 -271
- package/dist/apply-auto-instrumentation.js +320 -261
- package/dist/apply-auto-instrumentation.mjs +118 -59
- package/dist/auto-instrumentations/bundler/esbuild.cjs +377 -59
- package/dist/auto-instrumentations/bundler/esbuild.mjs +5 -4
- package/dist/auto-instrumentations/bundler/next.cjs +379 -61
- package/dist/auto-instrumentations/bundler/next.mjs +6 -5
- package/dist/auto-instrumentations/bundler/rollup.cjs +377 -59
- package/dist/auto-instrumentations/bundler/rollup.mjs +5 -4
- package/dist/auto-instrumentations/bundler/vite.cjs +406 -60
- package/dist/auto-instrumentations/bundler/vite.mjs +34 -5
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +363 -59
- package/dist/auto-instrumentations/bundler/webpack.cjs +377 -59
- package/dist/auto-instrumentations/bundler/webpack.mjs +6 -5
- package/dist/auto-instrumentations/{chunk-AKKPLXTP.mjs → chunk-2AMDGD65.mjs} +160 -57
- package/dist/auto-instrumentations/{chunk-V5LEODRX.mjs → chunk-BW33ULMW.mjs} +1 -1
- package/dist/auto-instrumentations/{chunk-XYN63IG5.mjs → chunk-I55G56ZL.mjs} +21 -58
- package/dist/auto-instrumentations/{chunk-NRE4QUQR.mjs → chunk-JPUFNW7X.mjs} +140 -0
- package/dist/auto-instrumentations/{chunk-6E22MYSW.mjs → chunk-XEYKUBLY.mjs} +30 -4
- package/dist/auto-instrumentations/{chunk-XZHHE4Y3.mjs → chunk-ZNHTSSGI.mjs} +155 -2
- package/dist/auto-instrumentations/hook.mjs +161 -3
- package/dist/auto-instrumentations/index.cjs +296 -1
- package/dist/auto-instrumentations/index.d.mts +5 -1
- package/dist/auto-instrumentations/index.d.ts +5 -1
- package/dist/auto-instrumentations/index.mjs +6 -2
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +105 -57
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +2 -2
- package/dist/auto-instrumentations/loader/esm-hook.mjs +1 -1
- package/dist/browser.d.mts +57 -5
- package/dist/browser.d.ts +57 -5
- package/dist/browser.js +1855 -285
- package/dist/browser.mjs +1855 -285
- package/dist/{chunk-PN7EWK66.mjs → chunk-CZM5JIQL.mjs} +209 -1
- package/dist/{chunk-VYNNEKSA.js → chunk-MF7NU6BT.js} +216 -8
- package/dist/{chunk-VRZZQPAA.js → chunk-QRHGVBKU.js} +2403 -1220
- package/dist/{chunk-XIZOM2HO.mjs → chunk-YKD22IMR.mjs} +1454 -271
- package/dist/cli.js +1645 -272
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +1855 -285
- package/dist/edge-light.mjs +1855 -285
- package/dist/index.d.mts +57 -5
- package/dist/index.d.ts +57 -5
- package/dist/index.js +600 -413
- package/dist/index.mjs +201 -14
- package/dist/instrumentation/index.d.mts +8 -0
- package/dist/instrumentation/index.d.ts +8 -0
- package/dist/instrumentation/index.js +1839 -466
- package/dist/instrumentation/index.mjs +1839 -466
- package/dist/vitest-evals-reporter.js +45 -43
- package/dist/vitest-evals-reporter.mjs +5 -3
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +1855 -285
- package/dist/workerd.mjs +1855 -285
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
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; } var _class;var __defProp = Object.defineProperty;
|
|
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; } var _class; var _class2; var _class3;var __defProp = Object.defineProperty;
|
|
2
2
|
var __export = (target, all) => {
|
|
3
3
|
for (var name in all)
|
|
4
4
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -9,8 +9,10 @@ var GLOBAL_INSTRUMENTATION_HOOKS_KEY = "__braintrust_instrumentation_hooks";
|
|
|
9
9
|
var GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION = 1;
|
|
10
10
|
var GLOBAL_INSTRUMENTATION_HOOKS_REGISTRY_BRAND = "braintrust.global-instrumentation-hooks.registry";
|
|
11
11
|
var GLOBAL_INSTRUMENTATION_HOOK_BRAND = "braintrust.global-instrumentation-hooks.hook";
|
|
12
|
+
var GLOBAL_INVOCATION_HOOK_BRAND = "braintrust.global-instrumentation-hooks.invocation-hook";
|
|
12
13
|
var registryBrand = Symbol.for(GLOBAL_INSTRUMENTATION_HOOKS_REGISTRY_BRAND);
|
|
13
14
|
var hookBrand = Symbol.for(GLOBAL_INSTRUMENTATION_HOOK_BRAND);
|
|
15
|
+
var invocationHookBrand = Symbol.for(GLOBAL_INVOCATION_HOOK_BRAND);
|
|
14
16
|
var errorReporter;
|
|
15
17
|
function setGlobalHookErrorReporter(reporter) {
|
|
16
18
|
const previousReporter = errorReporter;
|
|
@@ -155,19 +157,82 @@ var traceEvents = [
|
|
|
155
157
|
"asyncEnd",
|
|
156
158
|
"error"
|
|
157
159
|
];
|
|
158
|
-
|
|
160
|
+
function traceInvocation(hook, operator, target, thisArg, args, additional, callbackIndex = -1) {
|
|
161
|
+
const context = {
|
|
162
|
+
...additional,
|
|
163
|
+
arguments: args,
|
|
164
|
+
self: thisArg
|
|
165
|
+
};
|
|
166
|
+
const invoke = () => hook.invoke(target, thisArg, args, additional);
|
|
167
|
+
if (operator === "traceCallback") {
|
|
168
|
+
return hook.traceCallback(invoke, callbackIndex, context);
|
|
169
|
+
}
|
|
170
|
+
if (operator === "tracePromise") {
|
|
171
|
+
return hook.tracePromise(invoke, context);
|
|
172
|
+
}
|
|
173
|
+
return hook.traceSync(invoke, context);
|
|
174
|
+
}
|
|
175
|
+
var InvocationHook = (_class2 = class {constructor() { _class2.prototype.__init3.call(this); }
|
|
176
|
+
__init3() {this.interceptors = []}
|
|
177
|
+
get hasInterceptors() {
|
|
178
|
+
return this.interceptors.length > 0;
|
|
179
|
+
}
|
|
180
|
+
intercept(interceptor) {
|
|
181
|
+
if (typeof interceptor !== "function") {
|
|
182
|
+
throw new TypeError("interceptor must be a function");
|
|
183
|
+
}
|
|
184
|
+
this.interceptors = [...this.interceptors, interceptor];
|
|
185
|
+
let active = true;
|
|
186
|
+
return () => {
|
|
187
|
+
if (!active) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
active = false;
|
|
191
|
+
const index = this.interceptors.indexOf(interceptor);
|
|
192
|
+
if (index !== -1) {
|
|
193
|
+
this.interceptors = [
|
|
194
|
+
...this.interceptors.slice(0, index),
|
|
195
|
+
...this.interceptors.slice(index + 1)
|
|
196
|
+
];
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
invoke(target, thisArg, args, additional) {
|
|
201
|
+
const interceptors = this.interceptors;
|
|
202
|
+
if (interceptors.length === 0) {
|
|
203
|
+
return Reflect.apply(target, thisArg, args);
|
|
204
|
+
}
|
|
205
|
+
let next = target;
|
|
206
|
+
for (let index = interceptors.length - 1; index >= 0; index -= 1) {
|
|
207
|
+
const interceptor = interceptors[index];
|
|
208
|
+
const downstream = next;
|
|
209
|
+
next = function(...nextArgs) {
|
|
210
|
+
return interceptor(downstream, this, nextArgs, additional);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return Reflect.apply(next, thisArg, args);
|
|
214
|
+
}
|
|
215
|
+
}, _class2);
|
|
216
|
+
var TracingHook = (_class3 = class {
|
|
159
217
|
|
|
160
218
|
|
|
161
219
|
|
|
162
220
|
|
|
163
221
|
|
|
164
|
-
|
|
222
|
+
__init4() {this.invocationHook = new InvocationHook()}
|
|
223
|
+
constructor(nameOrChannels) {;_class3.prototype.__init4.call(this);
|
|
165
224
|
Object.defineProperty(this, hookBrand, {
|
|
166
225
|
configurable: false,
|
|
167
226
|
enumerable: false,
|
|
168
227
|
value: GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION,
|
|
169
228
|
writable: false
|
|
170
229
|
});
|
|
230
|
+
Object.defineProperty(this, invocationHookBrand, {
|
|
231
|
+
configurable: false,
|
|
232
|
+
enumerable: false,
|
|
233
|
+
value: GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION,
|
|
234
|
+
writable: false
|
|
235
|
+
});
|
|
171
236
|
if (typeof nameOrChannels === "string") {
|
|
172
237
|
this.start = new HookChannel(`tracing:${nameOrChannels}:start`);
|
|
173
238
|
this.end = new HookChannel(`tracing:${nameOrChannels}:end`);
|
|
@@ -185,6 +250,26 @@ var TracingHook = class {
|
|
|
185
250
|
get hasSubscribers() {
|
|
186
251
|
return this.start.hasSubscribers || this.end.hasSubscribers || this.asyncStart.hasSubscribers || this.asyncEnd.hasSubscribers || this.error.hasSubscribers;
|
|
187
252
|
}
|
|
253
|
+
get hasInterceptors() {
|
|
254
|
+
return this.invocationHook.hasInterceptors;
|
|
255
|
+
}
|
|
256
|
+
intercept(interceptor) {
|
|
257
|
+
return this.invocationHook.intercept(interceptor);
|
|
258
|
+
}
|
|
259
|
+
invoke(target, thisArg, args, additional) {
|
|
260
|
+
return this.invocationHook.invoke(target, thisArg, args, additional);
|
|
261
|
+
}
|
|
262
|
+
traceInvocation(operator, target, thisArg, args, additional, callbackIndex = -1) {
|
|
263
|
+
return traceInvocation(
|
|
264
|
+
this,
|
|
265
|
+
operator,
|
|
266
|
+
target,
|
|
267
|
+
thisArg,
|
|
268
|
+
args,
|
|
269
|
+
additional,
|
|
270
|
+
callbackIndex
|
|
271
|
+
);
|
|
272
|
+
}
|
|
188
273
|
subscribe(handlers) {
|
|
189
274
|
for (const eventName of traceEvents) {
|
|
190
275
|
const handler = handlers[eventName];
|
|
@@ -357,7 +442,7 @@ var TracingHook = class {
|
|
|
357
442
|
}
|
|
358
443
|
});
|
|
359
444
|
}
|
|
360
|
-
};
|
|
445
|
+
}, _class3);
|
|
361
446
|
var inertChannel = Object.freeze({
|
|
362
447
|
name: "braintrust:inert",
|
|
363
448
|
hasSubscribers: false,
|
|
@@ -406,17 +491,71 @@ function hasTracingHookShape(value) {
|
|
|
406
491
|
return false;
|
|
407
492
|
}
|
|
408
493
|
}
|
|
494
|
+
function hasInvocationHookShape(value) {
|
|
495
|
+
if (typeof value !== "object" && typeof value !== "function" || value === null) {
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
try {
|
|
499
|
+
const hook = value;
|
|
500
|
+
return value[invocationHookBrand] === GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION && typeof hook.hasInterceptors === "boolean" && typeof hook.intercept === "function" && typeof hook.invoke === "function";
|
|
501
|
+
} catch (e5) {
|
|
502
|
+
return false;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
function installInvocationHook(value) {
|
|
506
|
+
const hasInvocationHook = hasInvocationHookShape(value);
|
|
507
|
+
const invocationHook = new InvocationHook();
|
|
508
|
+
try {
|
|
509
|
+
if (!hasInvocationHook) {
|
|
510
|
+
Object.defineProperties(value, {
|
|
511
|
+
[invocationHookBrand]: {
|
|
512
|
+
configurable: false,
|
|
513
|
+
enumerable: false,
|
|
514
|
+
value: GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION,
|
|
515
|
+
writable: false
|
|
516
|
+
},
|
|
517
|
+
hasInterceptors: {
|
|
518
|
+
configurable: false,
|
|
519
|
+
enumerable: false,
|
|
520
|
+
get: () => invocationHook.hasInterceptors
|
|
521
|
+
},
|
|
522
|
+
intercept: {
|
|
523
|
+
configurable: false,
|
|
524
|
+
enumerable: false,
|
|
525
|
+
value: invocationHook.intercept.bind(invocationHook),
|
|
526
|
+
writable: false
|
|
527
|
+
},
|
|
528
|
+
invoke: {
|
|
529
|
+
configurable: false,
|
|
530
|
+
enumerable: false,
|
|
531
|
+
value: invocationHook.invoke.bind(invocationHook),
|
|
532
|
+
writable: false
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
if (typeof value.traceInvocation !== "function") {
|
|
537
|
+
Object.defineProperty(value, "traceInvocation", {
|
|
538
|
+
configurable: false,
|
|
539
|
+
enumerable: false,
|
|
540
|
+
value: traceInvocation.bind(void 0, value),
|
|
541
|
+
writable: false
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
} catch (error) {
|
|
545
|
+
reportError(error);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
409
548
|
function isCompatibleTracingHook(value) {
|
|
410
549
|
try {
|
|
411
550
|
return value[hookBrand] === GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION && hasTracingHookShape(value);
|
|
412
|
-
} catch (
|
|
551
|
+
} catch (e6) {
|
|
413
552
|
return false;
|
|
414
553
|
}
|
|
415
554
|
}
|
|
416
555
|
function isCompatibleHookRegistry(value) {
|
|
417
556
|
try {
|
|
418
557
|
return value instanceof Map && value[registryBrand] === GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION;
|
|
419
|
-
} catch (
|
|
558
|
+
} catch (e7) {
|
|
420
559
|
return false;
|
|
421
560
|
}
|
|
422
561
|
}
|
|
@@ -492,6 +631,7 @@ function newGlobalTracingChannel(nameOrChannels) {
|
|
|
492
631
|
return inertTracingHook;
|
|
493
632
|
}
|
|
494
633
|
if (isCompatibleTracingHook(existing)) {
|
|
634
|
+
installInvocationHook(existing);
|
|
495
635
|
return existing;
|
|
496
636
|
}
|
|
497
637
|
if (existing !== void 0) {
|
|
@@ -556,6 +696,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
556
696
|
CLAUDE_AGENT_SDK: "claude-agent-sdk",
|
|
557
697
|
CLOUDFLARE_AI_CHAT: "cloudflare-ai-chat",
|
|
558
698
|
CLOUDFLARE_AGENTS: "cloudflare-agents",
|
|
699
|
+
CLOUDFLARE_THINK: "cloudflare-think",
|
|
559
700
|
COHERE: "cohere",
|
|
560
701
|
CURSOR_SDK: "cursor-sdk",
|
|
561
702
|
EVE: "eve",
|
|
@@ -570,6 +711,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
570
711
|
LANGSMITH: "langsmith",
|
|
571
712
|
MASTRA: "mastra",
|
|
572
713
|
MISTRAL: "mistral",
|
|
714
|
+
OLLAMA: "ollama",
|
|
573
715
|
OPENAI: "openai",
|
|
574
716
|
OPENAI_AGENTS: "openai-agents",
|
|
575
717
|
OPENAI_CODEX: "openai-codex",
|
|
@@ -581,7 +723,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
581
723
|
var INTERNAL_SPAN_INSTRUMENTATION_NAME = /* @__PURE__ */ Symbol.for(
|
|
582
724
|
"braintrust.spanInstrumentationName"
|
|
583
725
|
);
|
|
584
|
-
var SDK_VERSION = true ? "3.
|
|
726
|
+
var SDK_VERSION = true ? "3.27.0" : "0.0.0";
|
|
585
727
|
function withSpanInstrumentationName(args, instrumentationName) {
|
|
586
728
|
return {
|
|
587
729
|
...args,
|
|
@@ -701,11 +843,21 @@ function defineChannels(pkg, channels, options) {
|
|
|
701
843
|
const tracingChannel2 = () => isomorph_default.newTracingChannel(
|
|
702
844
|
fullChannelName
|
|
703
845
|
);
|
|
846
|
+
const intercept2 = (interceptor) => {
|
|
847
|
+
const hook = tracingChannel2();
|
|
848
|
+
return typeof hook.intercept === "function" ? hook.intercept(interceptor) : () => {
|
|
849
|
+
};
|
|
850
|
+
};
|
|
704
851
|
return [
|
|
705
852
|
key,
|
|
706
853
|
{
|
|
707
854
|
...asyncSpec,
|
|
708
855
|
instrumentationName,
|
|
856
|
+
intercept: intercept2,
|
|
857
|
+
invoke: (target, thisArg, args, additional) => {
|
|
858
|
+
const hook = tracingChannel2();
|
|
859
|
+
return typeof hook.invoke === "function" ? hook.invoke(target, thisArg, args, additional) : Reflect.apply(target, thisArg, args);
|
|
860
|
+
},
|
|
709
861
|
tracingChannel: tracingChannel2,
|
|
710
862
|
tracePromise: (fn, context) => tracingChannel2().tracePromise(
|
|
711
863
|
fn,
|
|
@@ -719,11 +871,21 @@ function defineChannels(pkg, channels, options) {
|
|
|
719
871
|
const tracingChannel = () => isomorph_default.newTracingChannel(
|
|
720
872
|
fullChannelName
|
|
721
873
|
);
|
|
874
|
+
const intercept = (interceptor) => {
|
|
875
|
+
const hook = tracingChannel();
|
|
876
|
+
return typeof hook.intercept === "function" ? hook.intercept(interceptor) : () => {
|
|
877
|
+
};
|
|
878
|
+
};
|
|
722
879
|
return [
|
|
723
880
|
key,
|
|
724
881
|
{
|
|
725
882
|
...syncSpec,
|
|
726
883
|
instrumentationName,
|
|
884
|
+
intercept,
|
|
885
|
+
invoke: (target, thisArg, args, additional) => {
|
|
886
|
+
const hook = tracingChannel();
|
|
887
|
+
return typeof hook.invoke === "function" ? hook.invoke(target, thisArg, args, additional) : Reflect.apply(target, thisArg, args);
|
|
888
|
+
},
|
|
727
889
|
tracingChannel,
|
|
728
890
|
traceSync: (fn, context) => tracingChannel().traceSync(
|
|
729
891
|
fn,
|
|
@@ -811,6 +973,14 @@ var anthropicChannels = defineChannels(
|
|
|
811
973
|
betaMessagesToolRunner: channel({
|
|
812
974
|
channelName: "beta.messages.toolRunner",
|
|
813
975
|
kind: "sync-stream"
|
|
976
|
+
}),
|
|
977
|
+
betaSessionsEventsStream: channel({
|
|
978
|
+
channelName: "beta.sessions.events.stream",
|
|
979
|
+
kind: "async"
|
|
980
|
+
}),
|
|
981
|
+
betaSessionsThreadsEventsStream: channel({
|
|
982
|
+
channelName: "beta.sessions.threads.events.stream",
|
|
983
|
+
kind: "async"
|
|
814
984
|
})
|
|
815
985
|
},
|
|
816
986
|
{ instrumentationName: INSTRUMENTATION_NAMES.ANTHROPIC }
|
|
@@ -926,6 +1096,18 @@ var claudeAgentSDKChannels = defineChannels(
|
|
|
926
1096
|
{ instrumentationName: INSTRUMENTATION_NAMES.CLAUDE_AGENT_SDK }
|
|
927
1097
|
);
|
|
928
1098
|
|
|
1099
|
+
// src/instrumentation/plugins/cloudflare-think-channels.ts
|
|
1100
|
+
var cloudflareThinkChannels = defineChannels(
|
|
1101
|
+
"@cloudflare/think",
|
|
1102
|
+
{
|
|
1103
|
+
runInferenceLoop: channel({
|
|
1104
|
+
channelName: "Think.runInferenceLoop",
|
|
1105
|
+
kind: "async"
|
|
1106
|
+
})
|
|
1107
|
+
},
|
|
1108
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.CLOUDFLARE_THINK }
|
|
1109
|
+
);
|
|
1110
|
+
|
|
929
1111
|
// src/instrumentation/plugins/cursor-sdk-channels.ts
|
|
930
1112
|
var cursorSDKChannels = defineChannels(
|
|
931
1113
|
"@cursor/sdk",
|
|
@@ -1150,6 +1332,26 @@ var mistralChannels = defineChannels(
|
|
|
1150
1332
|
{ instrumentationName: INSTRUMENTATION_NAMES.MISTRAL }
|
|
1151
1333
|
);
|
|
1152
1334
|
|
|
1335
|
+
// src/instrumentation/plugins/ollama-channels.ts
|
|
1336
|
+
var ollamaChannels = defineChannels(
|
|
1337
|
+
"ollama",
|
|
1338
|
+
{
|
|
1339
|
+
chat: channel({
|
|
1340
|
+
channelName: "chat",
|
|
1341
|
+
kind: "async"
|
|
1342
|
+
}),
|
|
1343
|
+
generate: channel({
|
|
1344
|
+
channelName: "generate",
|
|
1345
|
+
kind: "async"
|
|
1346
|
+
}),
|
|
1347
|
+
embed: channel({
|
|
1348
|
+
channelName: "embed",
|
|
1349
|
+
kind: "async"
|
|
1350
|
+
})
|
|
1351
|
+
},
|
|
1352
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OLLAMA }
|
|
1353
|
+
);
|
|
1354
|
+
|
|
1153
1355
|
// src/instrumentation/plugins/google-adk-channels.ts
|
|
1154
1356
|
var googleADKChannels = defineChannels(
|
|
1155
1357
|
"@google/adk",
|
|
@@ -1405,6 +1607,7 @@ var envIntegrationAliases = {
|
|
|
1405
1607
|
cloudflareaichat: "cloudflareAIChat",
|
|
1406
1608
|
"cloudflare-ai-chat": "cloudflareAIChat",
|
|
1407
1609
|
"@cloudflare/ai-chat": "cloudflareAIChat",
|
|
1610
|
+
cloudflarethink: "cloudflareThink",
|
|
1408
1611
|
cursor: "cursor",
|
|
1409
1612
|
"cursor-sdk": "cursorSDK",
|
|
1410
1613
|
cursorsdk: "cursorSDK",
|
|
@@ -1425,6 +1628,7 @@ var envIntegrationAliases = {
|
|
|
1425
1628
|
openrouteragent: "openrouterAgent",
|
|
1426
1629
|
"openrouter-agent": "openrouterAgent",
|
|
1427
1630
|
mistral: "mistral",
|
|
1631
|
+
ollama: "ollama",
|
|
1428
1632
|
googleadk: "googleADK",
|
|
1429
1633
|
"google-adk": "googleADK",
|
|
1430
1634
|
cohere: "cohere",
|
|
@@ -1460,6 +1664,7 @@ function getDefaultInstrumentationIntegrations() {
|
|
|
1460
1664
|
huggingface: true,
|
|
1461
1665
|
claudeAgentSDK: true,
|
|
1462
1666
|
cloudflareAIChat: true,
|
|
1667
|
+
cloudflareThink: true,
|
|
1463
1668
|
cursor: true,
|
|
1464
1669
|
cursorSDK: true,
|
|
1465
1670
|
flue: true,
|
|
@@ -1468,6 +1673,7 @@ function getDefaultInstrumentationIntegrations() {
|
|
|
1468
1673
|
openrouter: true,
|
|
1469
1674
|
openrouterAgent: true,
|
|
1470
1675
|
mistral: true,
|
|
1676
|
+
ollama: true,
|
|
1471
1677
|
cohere: true,
|
|
1472
1678
|
groq: true,
|
|
1473
1679
|
bedrock: true,
|
|
@@ -1781,4 +1987,6 @@ var cloudflareAIChatChannels = defineChannels(
|
|
|
1781
1987
|
|
|
1782
1988
|
|
|
1783
1989
|
|
|
1784
|
-
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
exports.__export = __export; exports.GLOBAL_INSTRUMENTATION_HOOKS_KEY = GLOBAL_INSTRUMENTATION_HOOKS_KEY; exports.GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION = GLOBAL_INSTRUMENTATION_HOOKS_PROTOCOL_VERSION; exports.GLOBAL_INSTRUMENTATION_HOOKS_REGISTRY_BRAND = GLOBAL_INSTRUMENTATION_HOOKS_REGISTRY_BRAND; exports.GLOBAL_INSTRUMENTATION_HOOK_BRAND = GLOBAL_INSTRUMENTATION_HOOK_BRAND; exports.setGlobalHookErrorReporter = setGlobalHookErrorReporter; exports.isomorph_default = isomorph_default; exports.INSTRUMENTATION_NAMES = INSTRUMENTATION_NAMES; exports.withSpanInstrumentationName = withSpanInstrumentationName; exports.getSpanInstrumentationName = getSpanInstrumentationName; exports.detectSpanOriginEnvironment = detectSpanOriginEnvironment; exports.mergeSpanOriginContext = mergeSpanOriginContext; exports.openAIChannels = openAIChannels; exports.openAICodexChannels = openAICodexChannels; exports.anthropicChannels = anthropicChannels; exports.aiSDKChannels = aiSDKChannels; exports.harnessAgentChannels = harnessAgentChannels; exports.claudeAgentSDKChannels = claudeAgentSDKChannels; exports.cloudflareThinkChannels = cloudflareThinkChannels; exports.cursorSDKChannels = cursorSDKChannels; exports.openAIAgentsCoreChannels = openAIAgentsCoreChannels; exports.googleGenAIChannels = googleGenAIChannels; exports.huggingFaceChannels = huggingFaceChannels; exports.isSupportedHuggingFaceTransformersTask = isSupportedHuggingFaceTransformersTask; exports.registerHuggingFaceTransformersPipeline = registerHuggingFaceTransformersPipeline; exports.getHuggingFaceTransformersPipelineInfo = getHuggingFaceTransformersPipelineInfo; exports.huggingFaceTransformersChannels = huggingFaceTransformersChannels; exports.openRouterAgentChannels = openRouterAgentChannels; exports.openRouterChannels = openRouterChannels; exports.mistralChannels = mistralChannels; exports.ollamaChannels = ollamaChannels; exports.googleADKChannels = googleADKChannels; exports.cohereChannels = cohereChannels; exports.groqChannels = groqChannels; exports.bedrockRuntimeChannels = bedrockRuntimeChannels; exports.smithyCoreChannels = smithyCoreChannels; exports.smithyClientChannels = smithyClientChannels; exports.genkitChannels = genkitChannels; exports.genkitCoreChannels = genkitCoreChannels; exports.gitHubCopilotChannels = gitHubCopilotChannels; exports.flueChannels = flueChannels; exports.langChainChannels = langChainChannels; exports.langSmithChannels = langSmithChannels; exports.piCodingAgentChannels = piCodingAgentChannels; exports.strandsAgentSDKChannels = strandsAgentSDKChannels; exports.cloudflareAIChatChannels = cloudflareAIChatChannels; exports.cloudflareAgentsChannels = cloudflareAgentsChannels; exports.getDefaultInstrumentationIntegrations = getDefaultInstrumentationIntegrations; exports.readDisabledInstrumentationEnvConfig = readDisabledInstrumentationEnvConfig; exports.isInstrumentationIntegrationDisabled = isInstrumentationIntegrationDisabled; exports.installMastraExporterFactory = installMastraExporterFactory; exports.classifyMastraTarget = classifyMastraTarget; exports.patchMastraSource = patchMastraSource;
|