braintrust 3.24.0 → 3.26.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/NOTICE +6 -0
- package/dev/dist/index.d.mts +135 -2
- package/dev/dist/index.d.ts +135 -2
- package/dev/dist/index.js +4426 -2040
- package/dev/dist/index.mjs +3594 -1208
- package/dist/apply-auto-instrumentation.js +445 -403
- package/dist/apply-auto-instrumentation.mjs +249 -207
- package/dist/auto-instrumentations/bundler/esbuild.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/esbuild.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/esbuild.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/esbuild.mjs +5 -8
- package/dist/auto-instrumentations/bundler/next.cjs +1448 -818
- package/dist/auto-instrumentations/bundler/next.mjs +6 -29
- package/dist/auto-instrumentations/bundler/rollup.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/rollup.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/rollup.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/rollup.mjs +5 -8
- package/dist/auto-instrumentations/bundler/vite.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/vite.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/vite.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/vite.mjs +5 -8
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +1602 -728
- package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +20 -12
- package/dist/auto-instrumentations/bundler/webpack.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/webpack.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/webpack.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/webpack.mjs +5 -4
- package/dist/auto-instrumentations/{chunk-GSZHTAQW.mjs → chunk-6E22MYSW.mjs} +194 -93
- package/dist/auto-instrumentations/{chunk-VT6DDNKM.mjs → chunk-AKKPLXTP.mjs} +631 -194
- package/dist/auto-instrumentations/chunk-NRE4QUQR.mjs +509 -0
- package/dist/auto-instrumentations/{chunk-BURMPO7L.mjs → chunk-V5LEODRX.mjs} +2 -6
- package/dist/auto-instrumentations/{chunk-M6DLIJ2Z.mjs → chunk-XYN63IG5.mjs} +124 -194
- package/dist/auto-instrumentations/{chunk-F43DNLPD.mjs → chunk-XZHHE4Y3.mjs} +646 -510
- package/dist/auto-instrumentations/hook.mjs +894 -657
- package/dist/auto-instrumentations/index.cjs +1125 -490
- package/dist/auto-instrumentations/index.d.mts +6 -2
- package/dist/auto-instrumentations/index.d.ts +6 -2
- package/dist/auto-instrumentations/index.mjs +6 -1
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +492 -195
- package/dist/auto-instrumentations/loader/cjs-patch.d.mts +2 -2
- package/dist/auto-instrumentations/loader/cjs-patch.d.ts +2 -2
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +3 -2
- package/dist/auto-instrumentations/loader/esm-hook.mjs +1 -1
- package/dist/auto-instrumentations/plugin-B-aZh7EP.d.ts +30 -0
- package/dist/auto-instrumentations/plugin-Bnj4E_6B.d.mts +30 -0
- package/dist/auto-instrumentations/{types-RNPaKi9o.d.mts → types-C1fVeiCp.d.mts} +1 -1
- package/dist/auto-instrumentations/{types-RNPaKi9o.d.ts → types-C1fVeiCp.d.ts} +1 -1
- package/dist/browser.d.mts +824 -197
- package/dist/browser.d.ts +824 -197
- package/dist/browser.js +3897 -1228
- package/dist/browser.mjs +3897 -1228
- package/dist/chunk-PN7EWK66.mjs +1784 -0
- package/dist/{chunk-SU6EHKJV.js → chunk-VRZZQPAA.js} +3289 -1577
- package/dist/chunk-VYNNEKSA.js +1784 -0
- package/dist/{chunk-XE5FS7QY.mjs → chunk-XIZOM2HO.mjs} +2470 -758
- package/dist/cli.js +3596 -1211
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +3897 -1231
- package/dist/edge-light.mjs +3897 -1231
- package/dist/index.d.mts +824 -197
- package/dist/index.d.ts +824 -197
- package/dist/index.js +750 -445
- package/dist/index.mjs +334 -29
- package/dist/instrumentation/index.d.mts +135 -6
- package/dist/instrumentation/index.d.ts +135 -6
- package/dist/instrumentation/index.js +3696 -1257
- package/dist/instrumentation/index.mjs +3696 -1257
- package/dist/vitest-evals-reporter.js +16 -16
- package/dist/vitest-evals-reporter.mjs +2 -2
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +3897 -1231
- package/dist/workerd.mjs +3897 -1231
- package/licenses/node-diagnostics-channel/LICENSE +19 -0
- package/package.json +34 -35
- package/dist/auto-instrumentations/plugin-D0KHwSJv.d.mts +0 -44
- package/dist/auto-instrumentations/plugin-G6fgxk1b.d.ts +0 -44
- package/dist/chunk-7AUY2XWX.js +0 -1090
- package/dist/chunk-7F6GCRHH.mjs +0 -1090
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
newGlobalTracingChannel
|
|
3
|
+
} from "./chunk-NRE4QUQR.mjs";
|
|
4
|
+
|
|
1
5
|
// src/isomorph.ts
|
|
2
6
|
var DefaultAsyncLocalStorage = class {
|
|
3
7
|
constructor() {
|
|
@@ -11,73 +15,6 @@ var DefaultAsyncLocalStorage = class {
|
|
|
11
15
|
return void 0;
|
|
12
16
|
}
|
|
13
17
|
};
|
|
14
|
-
var DefaultChannel = class {
|
|
15
|
-
constructor(name) {
|
|
16
|
-
this.name = name;
|
|
17
|
-
}
|
|
18
|
-
name;
|
|
19
|
-
hasSubscribers = false;
|
|
20
|
-
subscribe(_subscription) {
|
|
21
|
-
}
|
|
22
|
-
unsubscribe(_subscription) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
bindStore(_store, _transform) {
|
|
26
|
-
}
|
|
27
|
-
unbindStore(_store) {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
publish(_message) {
|
|
31
|
-
}
|
|
32
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
33
|
-
runStores(_message, fn, thisArg, ...args) {
|
|
34
|
-
return fn.apply(thisArg, args);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
var DefaultTracingChannel = class {
|
|
38
|
-
start;
|
|
39
|
-
end;
|
|
40
|
-
asyncStart;
|
|
41
|
-
asyncEnd;
|
|
42
|
-
error;
|
|
43
|
-
constructor(nameOrChannels) {
|
|
44
|
-
if (typeof nameOrChannels === "string") {
|
|
45
|
-
this.start = new DefaultChannel(`tracing:${nameOrChannels}:start`);
|
|
46
|
-
this.end = new DefaultChannel(`tracing:${nameOrChannels}:end`);
|
|
47
|
-
this.asyncStart = new DefaultChannel(
|
|
48
|
-
`tracing:${nameOrChannels}:asyncStart`
|
|
49
|
-
);
|
|
50
|
-
this.asyncEnd = new DefaultChannel(`tracing:${nameOrChannels}:asyncEnd`);
|
|
51
|
-
this.error = new DefaultChannel(`tracing:${nameOrChannels}:error`);
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
this.start = nameOrChannels.start ?? new DefaultChannel("tracing:start");
|
|
55
|
-
this.end = nameOrChannels.end ?? new DefaultChannel("tracing:end");
|
|
56
|
-
this.asyncStart = nameOrChannels.asyncStart ?? new DefaultChannel("tracing:asyncStart");
|
|
57
|
-
this.asyncEnd = nameOrChannels.asyncEnd ?? new DefaultChannel("tracing:asyncEnd");
|
|
58
|
-
this.error = nameOrChannels.error ?? new DefaultChannel("tracing:error");
|
|
59
|
-
}
|
|
60
|
-
get hasSubscribers() {
|
|
61
|
-
return this.start.hasSubscribers || this.end.hasSubscribers || this.asyncStart.hasSubscribers || this.asyncEnd.hasSubscribers || this.error.hasSubscribers;
|
|
62
|
-
}
|
|
63
|
-
subscribe(_handlers) {
|
|
64
|
-
}
|
|
65
|
-
unsubscribe(_handlers) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
|
-
traceSync(fn, _message, thisArg, ...args) {
|
|
70
|
-
return fn.apply(thisArg, args);
|
|
71
|
-
}
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
-
tracePromise(fn, _message, thisArg, ...args) {
|
|
74
|
-
return fn.apply(thisArg, args);
|
|
75
|
-
}
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
|
-
traceCallback(fn, _position, _message, thisArg, ...args) {
|
|
78
|
-
return fn.apply(thisArg, args);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
18
|
var iso = {
|
|
82
19
|
buildType: "unknown",
|
|
83
20
|
// Will be set by configureBrowser() or configureNode()
|
|
@@ -88,7 +25,7 @@ var iso = {
|
|
|
88
25
|
getCallerLocation: () => void 0,
|
|
89
26
|
newAsyncLocalStorage: () => new DefaultAsyncLocalStorage(),
|
|
90
27
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
91
|
-
newTracingChannel: (nameOrChannels) =>
|
|
28
|
+
newTracingChannel: (nameOrChannels) => newGlobalTracingChannel(nameOrChannels),
|
|
92
29
|
processOn: (_0, _1) => {
|
|
93
30
|
},
|
|
94
31
|
basename: (filepath) => filepath.split(/[\\/]/).pop() || filepath,
|
|
@@ -101,7 +38,8 @@ var isomorph_default = iso;
|
|
|
101
38
|
function channel(spec) {
|
|
102
39
|
return spec;
|
|
103
40
|
}
|
|
104
|
-
function defineChannels(pkg, channels) {
|
|
41
|
+
function defineChannels(pkg, channels, options) {
|
|
42
|
+
const { instrumentationName } = options;
|
|
105
43
|
return Object.fromEntries(
|
|
106
44
|
Object.entries(channels).map(([key, spec]) => {
|
|
107
45
|
const fullChannelName = `orchestrion:${pkg}:${spec.channelName}`;
|
|
@@ -114,6 +52,7 @@ function defineChannels(pkg, channels) {
|
|
|
114
52
|
key,
|
|
115
53
|
{
|
|
116
54
|
...asyncSpec,
|
|
55
|
+
instrumentationName,
|
|
117
56
|
tracingChannel: tracingChannel2,
|
|
118
57
|
tracePromise: (fn, context) => tracingChannel2().tracePromise(
|
|
119
58
|
fn,
|
|
@@ -131,6 +70,7 @@ function defineChannels(pkg, channels) {
|
|
|
131
70
|
key,
|
|
132
71
|
{
|
|
133
72
|
...syncSpec,
|
|
73
|
+
instrumentationName,
|
|
134
74
|
tracingChannel,
|
|
135
75
|
traceSync: (fn, context) => tracingChannel().traceSync(
|
|
136
76
|
fn,
|
|
@@ -143,45 +83,81 @@ function defineChannels(pkg, channels) {
|
|
|
143
83
|
);
|
|
144
84
|
}
|
|
145
85
|
|
|
86
|
+
// src/span-origin.ts
|
|
87
|
+
var INSTRUMENTATION_NAMES = {
|
|
88
|
+
AI_SDK: "ai-sdk",
|
|
89
|
+
ANTHROPIC: "anthropic",
|
|
90
|
+
BEDROCK_RUNTIME: "bedrock-runtime",
|
|
91
|
+
BRAINTRUST_JS_LOGGER: "braintrust-js-logger",
|
|
92
|
+
CLAUDE_AGENT_SDK: "claude-agent-sdk",
|
|
93
|
+
CLOUDFLARE_AI_CHAT: "cloudflare-ai-chat",
|
|
94
|
+
CLOUDFLARE_AGENTS: "cloudflare-agents",
|
|
95
|
+
COHERE: "cohere",
|
|
96
|
+
CURSOR_SDK: "cursor-sdk",
|
|
97
|
+
EVE: "eve",
|
|
98
|
+
FLUE: "flue",
|
|
99
|
+
GENKIT: "genkit",
|
|
100
|
+
GITHUB_COPILOT: "github-copilot",
|
|
101
|
+
GOOGLE_ADK: "google-adk",
|
|
102
|
+
GOOGLE_GENAI: "google-genai",
|
|
103
|
+
GROQ: "groq",
|
|
104
|
+
HUGGINGFACE: "huggingface",
|
|
105
|
+
LANGCHAIN: "langchain",
|
|
106
|
+
LANGSMITH: "langsmith",
|
|
107
|
+
MASTRA: "mastra",
|
|
108
|
+
MISTRAL: "mistral",
|
|
109
|
+
OPENAI: "openai",
|
|
110
|
+
OPENAI_AGENTS: "openai-agents",
|
|
111
|
+
OPENAI_CODEX: "openai-codex",
|
|
112
|
+
OPENROUTER: "openrouter",
|
|
113
|
+
OPENROUTER_AGENT: "openrouter-agent",
|
|
114
|
+
PI_CODING_AGENT: "pi-coding-agent",
|
|
115
|
+
STRANDS_AGENT_SDK: "strands-agent-sdk"
|
|
116
|
+
};
|
|
117
|
+
|
|
146
118
|
// src/instrumentation/plugins/openai-channels.ts
|
|
147
|
-
var openAIChannels = defineChannels(
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
119
|
+
var openAIChannels = defineChannels(
|
|
120
|
+
"openai",
|
|
121
|
+
{
|
|
122
|
+
chatCompletionsCreate: channel({
|
|
123
|
+
channelName: "chat.completions.create",
|
|
124
|
+
kind: "async"
|
|
125
|
+
}),
|
|
126
|
+
embeddingsCreate: channel({
|
|
127
|
+
channelName: "embeddings.create",
|
|
128
|
+
kind: "async"
|
|
129
|
+
}),
|
|
130
|
+
betaChatCompletionsParse: channel({
|
|
131
|
+
channelName: "beta.chat.completions.parse",
|
|
132
|
+
kind: "async"
|
|
133
|
+
}),
|
|
134
|
+
betaChatCompletionsStream: channel({
|
|
135
|
+
channelName: "beta.chat.completions.stream",
|
|
136
|
+
kind: "sync-stream"
|
|
137
|
+
}),
|
|
138
|
+
moderationsCreate: channel({
|
|
139
|
+
channelName: "moderations.create",
|
|
140
|
+
kind: "async"
|
|
141
|
+
}),
|
|
142
|
+
responsesCreate: channel({
|
|
143
|
+
channelName: "responses.create",
|
|
144
|
+
kind: "async"
|
|
145
|
+
}),
|
|
146
|
+
responsesStream: channel({
|
|
147
|
+
channelName: "responses.stream",
|
|
148
|
+
kind: "sync-stream"
|
|
149
|
+
}),
|
|
150
|
+
responsesParse: channel({
|
|
151
|
+
channelName: "responses.parse",
|
|
152
|
+
kind: "async"
|
|
153
|
+
}),
|
|
154
|
+
responsesCompact: channel({
|
|
155
|
+
channelName: "responses.compact",
|
|
156
|
+
kind: "async"
|
|
157
|
+
})
|
|
158
|
+
},
|
|
159
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENAI }
|
|
160
|
+
);
|
|
185
161
|
|
|
186
162
|
// src/auto-instrumentations/configs/openai.ts
|
|
187
163
|
var openaiConfigs = [
|
|
@@ -363,16 +339,20 @@ var openaiConfigs = [
|
|
|
363
339
|
];
|
|
364
340
|
|
|
365
341
|
// src/instrumentation/plugins/openai-codex-channels.ts
|
|
366
|
-
var openAICodexChannels = defineChannels(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
342
|
+
var openAICodexChannels = defineChannels(
|
|
343
|
+
"@openai/codex-sdk",
|
|
344
|
+
{
|
|
345
|
+
run: channel({
|
|
346
|
+
channelName: "Thread.run",
|
|
347
|
+
kind: "async"
|
|
348
|
+
}),
|
|
349
|
+
runStreamed: channel({
|
|
350
|
+
channelName: "Thread.runStreamed",
|
|
351
|
+
kind: "async"
|
|
352
|
+
})
|
|
353
|
+
},
|
|
354
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENAI_CODEX }
|
|
355
|
+
);
|
|
376
356
|
|
|
377
357
|
// src/auto-instrumentations/configs/openai-codex.ts
|
|
378
358
|
var openAICodexVersionRange = ">=0.128.0 <1.0.0";
|
|
@@ -406,20 +386,24 @@ var openAICodexConfigs = [
|
|
|
406
386
|
];
|
|
407
387
|
|
|
408
388
|
// src/instrumentation/plugins/anthropic-channels.ts
|
|
409
|
-
var anthropicChannels = defineChannels(
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
389
|
+
var anthropicChannels = defineChannels(
|
|
390
|
+
"@anthropic-ai/sdk",
|
|
391
|
+
{
|
|
392
|
+
messagesCreate: channel({
|
|
393
|
+
channelName: "messages.create",
|
|
394
|
+
kind: "async"
|
|
395
|
+
}),
|
|
396
|
+
betaMessagesCreate: channel({
|
|
397
|
+
channelName: "beta.messages.create",
|
|
398
|
+
kind: "async"
|
|
399
|
+
}),
|
|
400
|
+
betaMessagesToolRunner: channel({
|
|
401
|
+
channelName: "beta.messages.toolRunner",
|
|
402
|
+
kind: "sync-stream"
|
|
403
|
+
})
|
|
404
|
+
},
|
|
405
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.ANTHROPIC }
|
|
406
|
+
);
|
|
423
407
|
|
|
424
408
|
// src/auto-instrumentations/configs/anthropic.ts
|
|
425
409
|
var anthropicConfigs = [
|
|
@@ -542,15 +526,27 @@ var clientSendChannel = channel({
|
|
|
542
526
|
channelName: "client.send",
|
|
543
527
|
kind: "async"
|
|
544
528
|
});
|
|
545
|
-
var bedrockRuntimeChannels = defineChannels(
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
529
|
+
var bedrockRuntimeChannels = defineChannels(
|
|
530
|
+
"aws-bedrock-runtime",
|
|
531
|
+
{
|
|
532
|
+
clientSend: clientSendChannel
|
|
533
|
+
},
|
|
534
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
|
|
535
|
+
);
|
|
536
|
+
var smithyCoreChannels = defineChannels(
|
|
537
|
+
"@smithy/core",
|
|
538
|
+
{
|
|
539
|
+
clientSend: clientSendChannel
|
|
540
|
+
},
|
|
541
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
|
|
542
|
+
);
|
|
543
|
+
var smithyClientChannels = defineChannels(
|
|
544
|
+
"@smithy/smithy-client",
|
|
545
|
+
{
|
|
546
|
+
clientSend: clientSendChannel
|
|
547
|
+
},
|
|
548
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
|
|
549
|
+
);
|
|
554
550
|
|
|
555
551
|
// src/auto-instrumentations/configs/bedrock-runtime.ts
|
|
556
552
|
var bedrockRuntimeConfigs = [
|
|
@@ -609,92 +605,102 @@ var bedrockRuntimeConfigs = [
|
|
|
609
605
|
];
|
|
610
606
|
|
|
611
607
|
// src/instrumentation/plugins/ai-sdk-channels.ts
|
|
612
|
-
var aiSDKChannels = defineChannels(
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
608
|
+
var aiSDKChannels = defineChannels(
|
|
609
|
+
"ai",
|
|
610
|
+
{
|
|
611
|
+
generateText: channel({
|
|
612
|
+
channelName: "generateText",
|
|
613
|
+
kind: "async"
|
|
614
|
+
}),
|
|
615
|
+
streamText: channel({
|
|
616
|
+
channelName: "streamText",
|
|
617
|
+
kind: "async"
|
|
618
|
+
}),
|
|
619
|
+
streamTextSync: channel({
|
|
620
|
+
channelName: "streamText.sync",
|
|
621
|
+
kind: "sync-stream"
|
|
622
|
+
}),
|
|
623
|
+
generateObject: channel({
|
|
624
|
+
channelName: "generateObject",
|
|
625
|
+
kind: "async"
|
|
626
|
+
}),
|
|
627
|
+
streamObject: channel({
|
|
628
|
+
channelName: "streamObject",
|
|
629
|
+
kind: "async"
|
|
630
|
+
}),
|
|
631
|
+
streamObjectSync: channel({
|
|
632
|
+
channelName: "streamObject.sync",
|
|
633
|
+
kind: "sync-stream"
|
|
634
|
+
}),
|
|
635
|
+
embed: channel({
|
|
639
636
|
channelName: "embed",
|
|
640
637
|
kind: "async"
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
638
|
+
}),
|
|
639
|
+
embedMany: channel({
|
|
640
|
+
channelName: "embedMany",
|
|
641
|
+
kind: "async"
|
|
642
|
+
}),
|
|
643
|
+
rerank: channel({
|
|
644
|
+
channelName: "rerank",
|
|
645
|
+
kind: "async"
|
|
646
|
+
}),
|
|
647
|
+
agentGenerate: channel({
|
|
648
|
+
channelName: "Agent.generate",
|
|
649
|
+
kind: "async"
|
|
650
|
+
}),
|
|
651
|
+
agentStream: channel({
|
|
652
|
+
channelName: "Agent.stream",
|
|
653
|
+
kind: "async"
|
|
654
|
+
}),
|
|
655
|
+
agentStreamSync: channel({
|
|
656
|
+
channelName: "Agent.stream.sync",
|
|
657
|
+
kind: "sync-stream"
|
|
658
|
+
}),
|
|
659
|
+
toolLoopAgentGenerate: channel({
|
|
660
|
+
channelName: "ToolLoopAgent.generate",
|
|
661
|
+
kind: "async"
|
|
662
|
+
}),
|
|
663
|
+
toolLoopAgentStream: channel({
|
|
664
|
+
channelName: "ToolLoopAgent.stream",
|
|
665
|
+
kind: "async"
|
|
666
|
+
}),
|
|
667
|
+
workflowAgentStream: channel({
|
|
668
|
+
channelName: "WorkflowAgent.stream",
|
|
669
|
+
kind: "async"
|
|
670
|
+
}),
|
|
671
|
+
v7CreateTelemetryDispatcher: channel({
|
|
672
|
+
channelName: "createTelemetryDispatcher",
|
|
673
|
+
kind: "sync-stream"
|
|
674
|
+
})
|
|
675
|
+
},
|
|
676
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
|
|
677
|
+
);
|
|
678
|
+
var harnessAgentChannels = defineChannels(
|
|
679
|
+
"@ai-sdk/harness",
|
|
680
|
+
{
|
|
681
|
+
createSession: channel({
|
|
682
|
+
channelName: "HarnessAgent.createSession",
|
|
683
|
+
kind: "async"
|
|
684
|
+
}),
|
|
685
|
+
generate: channel({
|
|
686
|
+
channelName: "HarnessAgent.generate",
|
|
687
|
+
kind: "async"
|
|
688
|
+
}),
|
|
689
|
+
stream: channel({
|
|
690
|
+
channelName: "HarnessAgent.stream",
|
|
691
|
+
kind: "async"
|
|
692
|
+
}),
|
|
693
|
+
continueGenerate: channel({
|
|
694
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
695
|
+
kind: "async"
|
|
696
|
+
}),
|
|
697
|
+
continueStream: channel({
|
|
698
|
+
channelName: "HarnessAgent.continueStream",
|
|
699
|
+
kind: "async"
|
|
700
|
+
})
|
|
701
|
+
},
|
|
702
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
|
|
703
|
+
);
|
|
698
704
|
|
|
699
705
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
700
706
|
var aiSDKConfigs = [
|
|
@@ -702,6 +708,7 @@ var aiSDKConfigs = [
|
|
|
702
708
|
// `./agent` entrypoint. The compiled class expression is anonymous, so match
|
|
703
709
|
// the first async method with each public name instead of a class name.
|
|
704
710
|
...[
|
|
711
|
+
["createSession", harnessAgentChannels.createSession.channelName],
|
|
705
712
|
["generate", harnessAgentChannels.generate.channelName],
|
|
706
713
|
["stream", harnessAgentChannels.stream.channelName],
|
|
707
714
|
["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
|
|
@@ -1097,7 +1104,8 @@ var claudeAgentSDKChannels = defineChannels(
|
|
|
1097
1104
|
channelName: "query",
|
|
1098
1105
|
kind: "sync-stream"
|
|
1099
1106
|
})
|
|
1100
|
-
}
|
|
1107
|
+
},
|
|
1108
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.CLAUDE_AGENT_SDK }
|
|
1101
1109
|
);
|
|
1102
1110
|
|
|
1103
1111
|
// src/auto-instrumentations/configs/claude-agent-sdk.ts
|
|
@@ -1131,25 +1139,59 @@ var claudeAgentSDKConfigs = [
|
|
|
1131
1139
|
}
|
|
1132
1140
|
];
|
|
1133
1141
|
|
|
1142
|
+
// src/instrumentation/plugins/cloudflare-agents-channels.ts
|
|
1143
|
+
var cloudflareAgentsChannels = defineChannels(
|
|
1144
|
+
"agents",
|
|
1145
|
+
{
|
|
1146
|
+
runAgentTool: channel({
|
|
1147
|
+
channelName: "Agent.runAgentTool",
|
|
1148
|
+
kind: "async"
|
|
1149
|
+
})
|
|
1150
|
+
},
|
|
1151
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.CLOUDFLARE_AGENTS }
|
|
1152
|
+
);
|
|
1153
|
+
|
|
1154
|
+
// src/auto-instrumentations/configs/cloudflare-agents.ts
|
|
1155
|
+
var cloudflareAgentsVersionRange = ">=0.17.0 <0.18.0";
|
|
1156
|
+
var cloudflareAgentsConfigs = [
|
|
1157
|
+
{
|
|
1158
|
+
channelName: cloudflareAgentsChannels.runAgentTool.channelName,
|
|
1159
|
+
module: {
|
|
1160
|
+
name: "agents",
|
|
1161
|
+
versionRange: cloudflareAgentsVersionRange,
|
|
1162
|
+
filePath: "dist/index.js"
|
|
1163
|
+
},
|
|
1164
|
+
functionQuery: {
|
|
1165
|
+
className: "Agent",
|
|
1166
|
+
methodName: "runAgentTool",
|
|
1167
|
+
kind: "Async"
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
];
|
|
1171
|
+
|
|
1134
1172
|
// src/instrumentation/plugins/cursor-sdk-channels.ts
|
|
1135
|
-
var cursorSDKChannels = defineChannels(
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1173
|
+
var cursorSDKChannels = defineChannels(
|
|
1174
|
+
"@cursor/sdk",
|
|
1175
|
+
{
|
|
1176
|
+
create: channel({
|
|
1177
|
+
channelName: "Agent.create",
|
|
1178
|
+
kind: "async"
|
|
1179
|
+
}),
|
|
1180
|
+
resume: channel({
|
|
1181
|
+
channelName: "Agent.resume",
|
|
1182
|
+
kind: "async"
|
|
1183
|
+
}),
|
|
1184
|
+
prompt: channel({
|
|
1185
|
+
channelName: "Agent.prompt",
|
|
1186
|
+
kind: "async"
|
|
1187
|
+
}),
|
|
1188
|
+
send: channel({
|
|
1189
|
+
channelName: "agent.send",
|
|
1190
|
+
kind: "async"
|
|
1191
|
+
})
|
|
1192
|
+
},
|
|
1193
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.CURSOR_SDK }
|
|
1194
|
+
);
|
|
1153
1195
|
|
|
1154
1196
|
// src/auto-instrumentations/configs/cursor-sdk.ts
|
|
1155
1197
|
var cursorSDKVersionRange = ">=1.0.7 <2.0.0";
|
|
@@ -1197,24 +1239,28 @@ var cursorSDKConfigs = cursorSDKEntrypoints.flatMap((filePath) => [
|
|
|
1197
1239
|
]);
|
|
1198
1240
|
|
|
1199
1241
|
// src/instrumentation/plugins/openai-agents-channels.ts
|
|
1200
|
-
var openAIAgentsCoreChannels = defineChannels(
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1242
|
+
var openAIAgentsCoreChannels = defineChannels(
|
|
1243
|
+
"@openai/agents-core",
|
|
1244
|
+
{
|
|
1245
|
+
onTraceStart: channel({
|
|
1246
|
+
channelName: "tracing.processor.onTraceStart",
|
|
1247
|
+
kind: "async"
|
|
1248
|
+
}),
|
|
1249
|
+
onTraceEnd: channel({
|
|
1250
|
+
channelName: "tracing.processor.onTraceEnd",
|
|
1251
|
+
kind: "async"
|
|
1252
|
+
}),
|
|
1253
|
+
onSpanStart: channel({
|
|
1254
|
+
channelName: "tracing.processor.onSpanStart",
|
|
1255
|
+
kind: "async"
|
|
1256
|
+
}),
|
|
1257
|
+
onSpanEnd: channel({
|
|
1258
|
+
channelName: "tracing.processor.onSpanEnd",
|
|
1259
|
+
kind: "async"
|
|
1260
|
+
})
|
|
1261
|
+
},
|
|
1262
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENAI_AGENTS }
|
|
1263
|
+
);
|
|
1218
1264
|
|
|
1219
1265
|
// src/auto-instrumentations/configs/openai-agents.ts
|
|
1220
1266
|
var lifecycleMethods = [
|
|
@@ -1242,24 +1288,28 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
|
|
|
1242
1288
|
);
|
|
1243
1289
|
|
|
1244
1290
|
// src/instrumentation/plugins/google-genai-channels.ts
|
|
1245
|
-
var googleGenAIChannels = defineChannels(
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1291
|
+
var googleGenAIChannels = defineChannels(
|
|
1292
|
+
"@google/genai",
|
|
1293
|
+
{
|
|
1294
|
+
generateContent: channel({
|
|
1295
|
+
channelName: "models.generateContent",
|
|
1296
|
+
kind: "async"
|
|
1297
|
+
}),
|
|
1298
|
+
generateContentStream: channel({
|
|
1299
|
+
channelName: "models.generateContentStream",
|
|
1300
|
+
kind: "async"
|
|
1301
|
+
}),
|
|
1302
|
+
embedContent: channel({
|
|
1303
|
+
channelName: "models.embedContent",
|
|
1304
|
+
kind: "async"
|
|
1305
|
+
}),
|
|
1306
|
+
interactionsCreate: channel({
|
|
1307
|
+
channelName: "interactions.create",
|
|
1308
|
+
kind: "async"
|
|
1309
|
+
})
|
|
1310
|
+
},
|
|
1311
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENAI }
|
|
1312
|
+
);
|
|
1263
1313
|
|
|
1264
1314
|
// src/auto-instrumentations/configs/google-genai.ts
|
|
1265
1315
|
var googleGenAIConfigs = [
|
|
@@ -1339,28 +1389,32 @@ var googleGenAIConfigs = [
|
|
|
1339
1389
|
];
|
|
1340
1390
|
|
|
1341
1391
|
// src/instrumentation/plugins/huggingface-channels.ts
|
|
1342
|
-
var huggingFaceChannels = defineChannels(
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1392
|
+
var huggingFaceChannels = defineChannels(
|
|
1393
|
+
"@huggingface/inference",
|
|
1394
|
+
{
|
|
1395
|
+
chatCompletion: channel({
|
|
1396
|
+
channelName: "chatCompletion",
|
|
1397
|
+
kind: "async"
|
|
1398
|
+
}),
|
|
1399
|
+
chatCompletionStream: channel({
|
|
1400
|
+
channelName: "chatCompletionStream",
|
|
1401
|
+
kind: "sync-stream"
|
|
1402
|
+
}),
|
|
1403
|
+
textGeneration: channel({
|
|
1404
|
+
channelName: "textGeneration",
|
|
1405
|
+
kind: "async"
|
|
1406
|
+
}),
|
|
1407
|
+
textGenerationStream: channel({
|
|
1408
|
+
channelName: "textGenerationStream",
|
|
1409
|
+
kind: "sync-stream"
|
|
1410
|
+
}),
|
|
1411
|
+
featureExtraction: channel({
|
|
1412
|
+
channelName: "featureExtraction",
|
|
1413
|
+
kind: "async"
|
|
1414
|
+
})
|
|
1415
|
+
},
|
|
1416
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.HUGGINGFACE }
|
|
1417
|
+
);
|
|
1364
1418
|
|
|
1365
1419
|
// src/auto-instrumentations/configs/huggingface.ts
|
|
1366
1420
|
var huggingFaceConfigs = [
|
|
@@ -1607,20 +1661,24 @@ var huggingFaceConfigs = [
|
|
|
1607
1661
|
];
|
|
1608
1662
|
|
|
1609
1663
|
// src/instrumentation/plugins/openrouter-agent-channels.ts
|
|
1610
|
-
var openRouterAgentChannels = defineChannels(
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1664
|
+
var openRouterAgentChannels = defineChannels(
|
|
1665
|
+
"@openrouter/agent",
|
|
1666
|
+
{
|
|
1667
|
+
callModel: channel({
|
|
1668
|
+
channelName: "callModel",
|
|
1669
|
+
kind: "sync-stream"
|
|
1670
|
+
}),
|
|
1671
|
+
callModelTurn: channel({
|
|
1672
|
+
channelName: "callModel.turn",
|
|
1673
|
+
kind: "async"
|
|
1674
|
+
}),
|
|
1675
|
+
toolExecute: channel({
|
|
1676
|
+
channelName: "tool.execute",
|
|
1677
|
+
kind: "async"
|
|
1678
|
+
})
|
|
1679
|
+
},
|
|
1680
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER_AGENT }
|
|
1681
|
+
);
|
|
1624
1682
|
|
|
1625
1683
|
// src/auto-instrumentations/configs/openrouter-agent.ts
|
|
1626
1684
|
var openRouterAgentConfigs = [
|
|
@@ -1639,38 +1697,40 @@ var openRouterAgentConfigs = [
|
|
|
1639
1697
|
];
|
|
1640
1698
|
|
|
1641
1699
|
// src/instrumentation/plugins/openrouter-channels.ts
|
|
1642
|
-
var openRouterChannels = defineChannels(
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1700
|
+
var openRouterChannels = defineChannels(
|
|
1701
|
+
"@openrouter/sdk",
|
|
1702
|
+
{
|
|
1703
|
+
chatSend: channel({
|
|
1704
|
+
channelName: "chat.send",
|
|
1705
|
+
kind: "async"
|
|
1706
|
+
}),
|
|
1707
|
+
embeddingsGenerate: channel({
|
|
1708
|
+
channelName: "embeddings.generate",
|
|
1709
|
+
kind: "async"
|
|
1710
|
+
}),
|
|
1711
|
+
rerankRerank: channel({
|
|
1653
1712
|
channelName: "rerank.rerank",
|
|
1654
1713
|
kind: "async"
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1714
|
+
}),
|
|
1715
|
+
betaResponsesSend: channel({
|
|
1716
|
+
channelName: "beta.responses.send",
|
|
1717
|
+
kind: "async"
|
|
1718
|
+
}),
|
|
1719
|
+
callModel: channel({
|
|
1720
|
+
channelName: "callModel",
|
|
1721
|
+
kind: "sync-stream"
|
|
1722
|
+
}),
|
|
1723
|
+
callModelTurn: channel({
|
|
1724
|
+
channelName: "callModel.turn",
|
|
1725
|
+
kind: "async"
|
|
1726
|
+
}),
|
|
1727
|
+
toolExecute: channel({
|
|
1728
|
+
channelName: "tool.execute",
|
|
1729
|
+
kind: "async"
|
|
1730
|
+
})
|
|
1731
|
+
},
|
|
1732
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER }
|
|
1733
|
+
);
|
|
1674
1734
|
|
|
1675
1735
|
// src/auto-instrumentations/configs/openrouter.ts
|
|
1676
1736
|
var openRouterConfigs = [
|
|
@@ -1678,7 +1738,7 @@ var openRouterConfigs = [
|
|
|
1678
1738
|
channelName: openRouterChannels.chatSend.channelName,
|
|
1679
1739
|
module: {
|
|
1680
1740
|
name: "@openrouter/sdk",
|
|
1681
|
-
versionRange: ">=0.9.11 <
|
|
1741
|
+
versionRange: ">=0.9.11 <2.0.0",
|
|
1682
1742
|
filePath: "esm/sdk/chat.js"
|
|
1683
1743
|
},
|
|
1684
1744
|
functionQuery: {
|
|
@@ -1691,7 +1751,7 @@ var openRouterConfigs = [
|
|
|
1691
1751
|
channelName: openRouterChannels.embeddingsGenerate.channelName,
|
|
1692
1752
|
module: {
|
|
1693
1753
|
name: "@openrouter/sdk",
|
|
1694
|
-
versionRange: ">=0.9.11 <
|
|
1754
|
+
versionRange: ">=0.9.11 <2.0.0",
|
|
1695
1755
|
filePath: "esm/sdk/embeddings.js"
|
|
1696
1756
|
},
|
|
1697
1757
|
functionQuery: {
|
|
@@ -1704,7 +1764,7 @@ var openRouterConfigs = [
|
|
|
1704
1764
|
channelName: openRouterChannels.rerankRerank.channelName,
|
|
1705
1765
|
module: {
|
|
1706
1766
|
name: "@openrouter/sdk",
|
|
1707
|
-
versionRange: ">=0.12.0 <
|
|
1767
|
+
versionRange: ">=0.12.0 <2.0.0",
|
|
1708
1768
|
filePath: "esm/sdk/rerank.js"
|
|
1709
1769
|
},
|
|
1710
1770
|
functionQuery: {
|
|
@@ -1717,7 +1777,7 @@ var openRouterConfigs = [
|
|
|
1717
1777
|
channelName: openRouterChannels.betaResponsesSend.channelName,
|
|
1718
1778
|
module: {
|
|
1719
1779
|
name: "@openrouter/sdk",
|
|
1720
|
-
versionRange: ">=0.9.11 <
|
|
1780
|
+
versionRange: ">=0.9.11 <2.0.0",
|
|
1721
1781
|
filePath: "esm/sdk/responses.js"
|
|
1722
1782
|
},
|
|
1723
1783
|
functionQuery: {
|
|
@@ -1730,7 +1790,7 @@ var openRouterConfigs = [
|
|
|
1730
1790
|
channelName: openRouterChannels.callModel.channelName,
|
|
1731
1791
|
module: {
|
|
1732
1792
|
name: "@openrouter/sdk",
|
|
1733
|
-
versionRange: ">=0.9.11 <
|
|
1793
|
+
versionRange: ">=0.9.11 <2.0.0",
|
|
1734
1794
|
filePath: "esm/sdk/sdk.js"
|
|
1735
1795
|
},
|
|
1736
1796
|
functionQuery: {
|
|
@@ -1742,52 +1802,56 @@ var openRouterConfigs = [
|
|
|
1742
1802
|
];
|
|
1743
1803
|
|
|
1744
1804
|
// src/instrumentation/plugins/mistral-channels.ts
|
|
1745
|
-
var mistralChannels = defineChannels(
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1805
|
+
var mistralChannels = defineChannels(
|
|
1806
|
+
"@mistralai/mistralai",
|
|
1807
|
+
{
|
|
1808
|
+
chatComplete: channel({
|
|
1809
|
+
channelName: "chat.complete",
|
|
1810
|
+
kind: "async"
|
|
1811
|
+
}),
|
|
1812
|
+
chatStream: channel({
|
|
1813
|
+
channelName: "chat.stream",
|
|
1814
|
+
kind: "async"
|
|
1815
|
+
}),
|
|
1816
|
+
embeddingsCreate: channel({
|
|
1817
|
+
channelName: "embeddings.create",
|
|
1818
|
+
kind: "async"
|
|
1819
|
+
}),
|
|
1820
|
+
classifiersModerate: channel({
|
|
1821
|
+
channelName: "classifiers.moderate",
|
|
1822
|
+
kind: "async"
|
|
1823
|
+
}),
|
|
1824
|
+
classifiersModerateChat: channel({
|
|
1825
|
+
channelName: "classifiers.moderateChat",
|
|
1826
|
+
kind: "async"
|
|
1827
|
+
}),
|
|
1828
|
+
classifiersClassify: channel({
|
|
1829
|
+
channelName: "classifiers.classify",
|
|
1830
|
+
kind: "async"
|
|
1831
|
+
}),
|
|
1832
|
+
classifiersClassifyChat: channel({
|
|
1833
|
+
channelName: "classifiers.classifyChat",
|
|
1834
|
+
kind: "async"
|
|
1835
|
+
}),
|
|
1836
|
+
fimComplete: channel({
|
|
1837
|
+
channelName: "fim.complete",
|
|
1838
|
+
kind: "async"
|
|
1839
|
+
}),
|
|
1840
|
+
fimStream: channel({
|
|
1841
|
+
channelName: "fim.stream",
|
|
1842
|
+
kind: "async"
|
|
1843
|
+
}),
|
|
1844
|
+
agentsComplete: channel({
|
|
1845
|
+
channelName: "agents.complete",
|
|
1846
|
+
kind: "async"
|
|
1847
|
+
}),
|
|
1848
|
+
agentsStream: channel({
|
|
1849
|
+
channelName: "agents.stream",
|
|
1850
|
+
kind: "async"
|
|
1851
|
+
})
|
|
1852
|
+
},
|
|
1853
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.MISTRAL }
|
|
1854
|
+
);
|
|
1791
1855
|
|
|
1792
1856
|
// src/auto-instrumentations/configs/mistral.ts
|
|
1793
1857
|
var mistralConfigs = [
|
|
@@ -2080,20 +2144,24 @@ var mistralConfigs = [
|
|
|
2080
2144
|
];
|
|
2081
2145
|
|
|
2082
2146
|
// src/instrumentation/plugins/google-adk-channels.ts
|
|
2083
|
-
var googleADKChannels = defineChannels(
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2147
|
+
var googleADKChannels = defineChannels(
|
|
2148
|
+
"@google/adk",
|
|
2149
|
+
{
|
|
2150
|
+
runnerRunAsync: channel({
|
|
2151
|
+
channelName: "runner.runAsync",
|
|
2152
|
+
kind: "sync-stream"
|
|
2153
|
+
}),
|
|
2154
|
+
agentRunAsync: channel({
|
|
2155
|
+
channelName: "agent.runAsync",
|
|
2156
|
+
kind: "sync-stream"
|
|
2157
|
+
}),
|
|
2158
|
+
toolRunAsync: channel({
|
|
2159
|
+
channelName: "tool.runAsync",
|
|
2160
|
+
kind: "async"
|
|
2161
|
+
})
|
|
2162
|
+
},
|
|
2163
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_ADK }
|
|
2164
|
+
);
|
|
2097
2165
|
|
|
2098
2166
|
// src/auto-instrumentations/configs/google-adk.ts
|
|
2099
2167
|
var googleADKVersionRange = ">=0.1.0";
|
|
@@ -2323,25 +2391,67 @@ var googleADKConfigs = [
|
|
|
2323
2391
|
}
|
|
2324
2392
|
];
|
|
2325
2393
|
|
|
2394
|
+
// src/instrumentation/plugins/cloudflare-ai-chat-channels.ts
|
|
2395
|
+
var cloudflareAIChatChannels = defineChannels(
|
|
2396
|
+
"@cloudflare/ai-chat",
|
|
2397
|
+
{
|
|
2398
|
+
runExclusiveChatTurn: channel({
|
|
2399
|
+
channelName: "AIChatAgent._runExclusiveChatTurn",
|
|
2400
|
+
kind: "async"
|
|
2401
|
+
}),
|
|
2402
|
+
onChatResponse: channel({
|
|
2403
|
+
channelName: "AIChatAgent.onChatResponse",
|
|
2404
|
+
kind: "sync-stream"
|
|
2405
|
+
})
|
|
2406
|
+
},
|
|
2407
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.CLOUDFLARE_AI_CHAT }
|
|
2408
|
+
);
|
|
2409
|
+
|
|
2410
|
+
// src/auto-instrumentations/configs/cloudflare-ai-chat.ts
|
|
2411
|
+
var cloudflareAIChatVersionRange = ">=0.9.0 <0.10.0";
|
|
2412
|
+
var cloudflareAIChatConfigs = [
|
|
2413
|
+
{
|
|
2414
|
+
// AIChatAgent subclasses replace onChatMessage, so there is no stable
|
|
2415
|
+
// public implementation for the transformer to target. This runner is
|
|
2416
|
+
// the narrowest shared boundary around every chat turn; keep the version
|
|
2417
|
+
// range tight because it is an internal method.
|
|
2418
|
+
channelName: cloudflareAIChatChannels.runExclusiveChatTurn.channelName,
|
|
2419
|
+
module: {
|
|
2420
|
+
name: "@cloudflare/ai-chat",
|
|
2421
|
+
versionRange: cloudflareAIChatVersionRange,
|
|
2422
|
+
filePath: "dist/index.js"
|
|
2423
|
+
},
|
|
2424
|
+
functionQuery: {
|
|
2425
|
+
className: "AIChatAgent",
|
|
2426
|
+
methodName: "_runExclusiveChatTurn",
|
|
2427
|
+
kind: "Async"
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
];
|
|
2431
|
+
|
|
2326
2432
|
// src/instrumentation/plugins/cohere-channels.ts
|
|
2327
|
-
var cohereChannels = defineChannels(
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2433
|
+
var cohereChannels = defineChannels(
|
|
2434
|
+
"cohere-ai",
|
|
2435
|
+
{
|
|
2436
|
+
chat: channel({
|
|
2437
|
+
channelName: "chat",
|
|
2438
|
+
kind: "async"
|
|
2439
|
+
}),
|
|
2440
|
+
chatStream: channel({
|
|
2441
|
+
channelName: "chatStream",
|
|
2442
|
+
kind: "async"
|
|
2443
|
+
}),
|
|
2444
|
+
embed: channel({
|
|
2445
|
+
channelName: "embed",
|
|
2446
|
+
kind: "async"
|
|
2447
|
+
}),
|
|
2448
|
+
rerank: channel({
|
|
2449
|
+
channelName: "rerank",
|
|
2450
|
+
kind: "async"
|
|
2451
|
+
})
|
|
2452
|
+
},
|
|
2453
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.COHERE }
|
|
2454
|
+
);
|
|
2345
2455
|
|
|
2346
2456
|
// src/auto-instrumentations/configs/cohere.ts
|
|
2347
2457
|
var cohereConfigs = [
|
|
@@ -2608,18 +2718,20 @@ var cohereConfigs = [
|
|
|
2608
2718
|
];
|
|
2609
2719
|
|
|
2610
2720
|
// src/instrumentation/plugins/groq-channels.ts
|
|
2611
|
-
var groqChannels = defineChannels(
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2721
|
+
var groqChannels = defineChannels(
|
|
2722
|
+
"groq-sdk",
|
|
2723
|
+
{
|
|
2724
|
+
chatCompletionsCreate: channel({
|
|
2725
|
+
channelName: "chat.completions.create",
|
|
2726
|
+
kind: "async"
|
|
2727
|
+
}),
|
|
2728
|
+
embeddingsCreate: channel({
|
|
2618
2729
|
channelName: "embeddings.create",
|
|
2619
2730
|
kind: "async"
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
|
-
}
|
|
2731
|
+
})
|
|
2732
|
+
},
|
|
2733
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GROQ }
|
|
2734
|
+
);
|
|
2623
2735
|
|
|
2624
2736
|
// src/auto-instrumentations/configs/groq.ts
|
|
2625
2737
|
var groqConfigs = [
|
|
@@ -2652,38 +2764,46 @@ var groqConfigs = [
|
|
|
2652
2764
|
];
|
|
2653
2765
|
|
|
2654
2766
|
// src/instrumentation/plugins/genkit-channels.ts
|
|
2655
|
-
var genkitChannels = defineChannels(
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2767
|
+
var genkitChannels = defineChannels(
|
|
2768
|
+
"@genkit-ai/ai",
|
|
2769
|
+
{
|
|
2770
|
+
generate: channel({
|
|
2771
|
+
channelName: "generate",
|
|
2772
|
+
kind: "async"
|
|
2773
|
+
}),
|
|
2774
|
+
generateStream: channel({
|
|
2775
|
+
channelName: "generateStream",
|
|
2776
|
+
kind: "sync-stream"
|
|
2777
|
+
}),
|
|
2778
|
+
embed: channel({
|
|
2779
|
+
channelName: "embed",
|
|
2780
|
+
kind: "async"
|
|
2781
|
+
}),
|
|
2782
|
+
embedMany: channel({
|
|
2783
|
+
channelName: "embedMany",
|
|
2784
|
+
kind: "async"
|
|
2785
|
+
}),
|
|
2786
|
+
actionRun: channel({
|
|
2787
|
+
channelName: "action.run",
|
|
2788
|
+
kind: "async"
|
|
2789
|
+
}),
|
|
2790
|
+
actionStream: channel({
|
|
2791
|
+
channelName: "action.stream",
|
|
2792
|
+
kind: "sync-stream"
|
|
2793
|
+
})
|
|
2794
|
+
},
|
|
2795
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
|
|
2796
|
+
);
|
|
2797
|
+
var genkitCoreChannels = defineChannels(
|
|
2798
|
+
"@genkit-ai/core",
|
|
2799
|
+
{
|
|
2800
|
+
actionSpan: channel({
|
|
2801
|
+
channelName: "action.span",
|
|
2802
|
+
kind: "async"
|
|
2803
|
+
})
|
|
2804
|
+
},
|
|
2805
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
|
|
2806
|
+
);
|
|
2687
2807
|
|
|
2688
2808
|
// src/auto-instrumentations/configs/genkit.ts
|
|
2689
2809
|
var genkitVersionRange = ">=1.0.0 <2.0.0";
|
|
@@ -2845,20 +2965,24 @@ var genkitConfigs = [
|
|
|
2845
2965
|
];
|
|
2846
2966
|
|
|
2847
2967
|
// src/instrumentation/plugins/github-copilot-channels.ts
|
|
2848
|
-
var gitHubCopilotChannels = defineChannels(
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2968
|
+
var gitHubCopilotChannels = defineChannels(
|
|
2969
|
+
"@github/copilot-sdk",
|
|
2970
|
+
{
|
|
2971
|
+
createSession: channel({
|
|
2972
|
+
channelName: "client.createSession",
|
|
2973
|
+
kind: "async"
|
|
2974
|
+
}),
|
|
2975
|
+
resumeSession: channel({
|
|
2976
|
+
channelName: "client.resumeSession",
|
|
2977
|
+
kind: "async"
|
|
2978
|
+
}),
|
|
2979
|
+
sendAndWait: channel({
|
|
2980
|
+
channelName: "session.sendAndWait",
|
|
2981
|
+
kind: "async"
|
|
2982
|
+
})
|
|
2983
|
+
},
|
|
2984
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GITHUB_COPILOT }
|
|
2985
|
+
);
|
|
2862
2986
|
|
|
2863
2987
|
// src/auto-instrumentations/configs/github-copilot.ts
|
|
2864
2988
|
var gitHubCopilotConfigs = [
|
|
@@ -2949,16 +3073,20 @@ var gitHubCopilotConfigs = [
|
|
|
2949
3073
|
];
|
|
2950
3074
|
|
|
2951
3075
|
// src/instrumentation/plugins/langchain-channels.ts
|
|
2952
|
-
var langChainChannels = defineChannels(
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
3076
|
+
var langChainChannels = defineChannels(
|
|
3077
|
+
"@langchain/core",
|
|
3078
|
+
{
|
|
3079
|
+
configure: channel({
|
|
3080
|
+
channelName: "CallbackManager.configure",
|
|
3081
|
+
kind: "sync-stream"
|
|
3082
|
+
}),
|
|
3083
|
+
configureSync: channel({
|
|
3084
|
+
channelName: "CallbackManager._configureSync",
|
|
3085
|
+
kind: "sync-stream"
|
|
3086
|
+
})
|
|
3087
|
+
},
|
|
3088
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.LANGCHAIN }
|
|
3089
|
+
);
|
|
2962
3090
|
|
|
2963
3091
|
// src/auto-instrumentations/configs/langchain.ts
|
|
2964
3092
|
var langChainCoreVersionRange = ">=0.3.42";
|
|
@@ -2993,20 +3121,24 @@ var langchainConfigs = [
|
|
|
2993
3121
|
];
|
|
2994
3122
|
|
|
2995
3123
|
// src/instrumentation/plugins/langsmith-channels.ts
|
|
2996
|
-
var langSmithChannels = defineChannels(
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3124
|
+
var langSmithChannels = defineChannels(
|
|
3125
|
+
"langsmith",
|
|
3126
|
+
{
|
|
3127
|
+
createRun: channel({
|
|
3128
|
+
channelName: "Client.createRun",
|
|
3129
|
+
kind: "async"
|
|
3130
|
+
}),
|
|
3131
|
+
updateRun: channel({
|
|
3132
|
+
channelName: "Client.updateRun",
|
|
3133
|
+
kind: "async"
|
|
3134
|
+
}),
|
|
3135
|
+
batchIngestRuns: channel({
|
|
3136
|
+
channelName: "Client.batchIngestRuns",
|
|
3137
|
+
kind: "async"
|
|
3138
|
+
})
|
|
3139
|
+
},
|
|
3140
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.LANGSMITH }
|
|
3141
|
+
);
|
|
3010
3142
|
|
|
3011
3143
|
// src/auto-instrumentations/configs/langsmith.ts
|
|
3012
3144
|
var versionRange = ">=0.3.30 <1.0.0";
|
|
@@ -3050,11 +3182,12 @@ var piCodingAgentChannels = defineChannels(
|
|
|
3050
3182
|
channelName: "AgentSession.prompt",
|
|
3051
3183
|
kind: "async"
|
|
3052
3184
|
})
|
|
3053
|
-
}
|
|
3185
|
+
},
|
|
3186
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.PI_CODING_AGENT }
|
|
3054
3187
|
);
|
|
3055
3188
|
|
|
3056
3189
|
// src/auto-instrumentations/configs/pi-coding-agent.ts
|
|
3057
|
-
var piCodingAgentVersionRange = ">=0.79.0 <0.
|
|
3190
|
+
var piCodingAgentVersionRange = ">=0.79.0 <0.82.0";
|
|
3058
3191
|
var piCodingAgentConfigs = [
|
|
3059
3192
|
{
|
|
3060
3193
|
channelName: piCodingAgentChannels.prompt.channelName,
|
|
@@ -3074,12 +3207,14 @@ var piCodingAgentConfigs = [
|
|
|
3074
3207
|
export {
|
|
3075
3208
|
channel,
|
|
3076
3209
|
defineChannels,
|
|
3210
|
+
INSTRUMENTATION_NAMES,
|
|
3077
3211
|
openaiConfigs,
|
|
3078
3212
|
openAICodexConfigs,
|
|
3079
3213
|
anthropicConfigs,
|
|
3080
3214
|
bedrockRuntimeConfigs,
|
|
3081
3215
|
aiSDKConfigs,
|
|
3082
3216
|
claudeAgentSDKConfigs,
|
|
3217
|
+
cloudflareAgentsConfigs,
|
|
3083
3218
|
cursorSDKConfigs,
|
|
3084
3219
|
openAIAgentsCoreConfigs,
|
|
3085
3220
|
googleGenAIConfigs,
|
|
@@ -3088,6 +3223,7 @@ export {
|
|
|
3088
3223
|
openRouterConfigs,
|
|
3089
3224
|
mistralConfigs,
|
|
3090
3225
|
googleADKConfigs,
|
|
3226
|
+
cloudflareAIChatConfigs,
|
|
3091
3227
|
cohereConfigs,
|
|
3092
3228
|
groqConfigs,
|
|
3093
3229
|
genkitConfigs,
|