braintrust 3.24.0 → 3.25.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.d.mts +5 -0
- package/dev/dist/index.d.ts +5 -0
- package/dev/dist/index.js +2614 -1567
- package/dev/dist/index.mjs +2037 -990
- package/dist/apply-auto-instrumentation.js +200 -199
- package/dist/apply-auto-instrumentation.mjs +8 -7
- package/dist/auto-instrumentations/bundler/esbuild.cjs +596 -462
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/next.cjs +596 -462
- package/dist/auto-instrumentations/bundler/next.mjs +3 -3
- package/dist/auto-instrumentations/bundler/rollup.cjs +596 -462
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +596 -462
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +596 -462
- package/dist/auto-instrumentations/bundler/webpack.cjs +596 -462
- package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
- package/dist/auto-instrumentations/{chunk-BURMPO7L.mjs → chunk-7P6563SW.mjs} +1 -1
- package/dist/auto-instrumentations/{chunk-F43DNLPD.mjs → chunk-CZ24KNHT.mjs} +569 -442
- package/dist/auto-instrumentations/{chunk-GSZHTAQW.mjs → chunk-JPVCUKTY.mjs} +30 -21
- package/dist/auto-instrumentations/hook.mjs +648 -476
- package/dist/auto-instrumentations/index.cjs +568 -442
- package/dist/auto-instrumentations/index.mjs +1 -1
- package/dist/browser.d.mts +7 -0
- package/dist/browser.d.ts +7 -0
- package/dist/browser.js +2022 -971
- package/dist/browser.mjs +2022 -971
- package/dist/{chunk-XE5FS7QY.mjs → chunk-2SANLSWX.mjs} +1375 -597
- package/dist/{chunk-7F6GCRHH.mjs → chunk-ABR2QWDP.mjs} +702 -456
- package/dist/{chunk-SU6EHKJV.js → chunk-GSIDVFE6.js} +2176 -1398
- package/dist/{chunk-7AUY2XWX.js → chunk-P25IOOU4.js} +704 -458
- package/dist/cli.js +2005 -958
- package/dist/edge-light.js +2022 -971
- package/dist/edge-light.mjs +2022 -971
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +447 -402
- package/dist/index.mjs +72 -27
- package/dist/instrumentation/index.d.mts +5 -0
- package/dist/instrumentation/index.d.ts +5 -0
- package/dist/instrumentation/index.js +1990 -981
- package/dist/instrumentation/index.mjs +1990 -981
- package/dist/vitest-evals-reporter.js +16 -16
- package/dist/vitest-evals-reporter.mjs +2 -2
- package/dist/workerd.js +2022 -971
- package/dist/workerd.mjs +2022 -971
- package/package.json +2 -2
|
@@ -189,11 +189,150 @@ var iso = {
|
|
|
189
189
|
};
|
|
190
190
|
var isomorph_default = iso;
|
|
191
191
|
|
|
192
|
+
// src/span-origin.ts
|
|
193
|
+
var INSTRUMENTATION_NAMES = {
|
|
194
|
+
AI_SDK: "ai-sdk",
|
|
195
|
+
ANTHROPIC: "anthropic",
|
|
196
|
+
BEDROCK_RUNTIME: "bedrock-runtime",
|
|
197
|
+
BRAINTRUST_JS_LOGGER: "braintrust-js-logger",
|
|
198
|
+
CLAUDE_AGENT_SDK: "claude-agent-sdk",
|
|
199
|
+
COHERE: "cohere",
|
|
200
|
+
CURSOR_SDK: "cursor-sdk",
|
|
201
|
+
EVE: "eve",
|
|
202
|
+
FLUE: "flue",
|
|
203
|
+
GENKIT: "genkit",
|
|
204
|
+
GITHUB_COPILOT: "github-copilot",
|
|
205
|
+
GOOGLE_ADK: "google-adk",
|
|
206
|
+
GOOGLE_GENAI: "google-genai",
|
|
207
|
+
GROQ: "groq",
|
|
208
|
+
HUGGINGFACE: "huggingface",
|
|
209
|
+
LANGCHAIN: "langchain",
|
|
210
|
+
LANGSMITH: "langsmith",
|
|
211
|
+
MASTRA: "mastra",
|
|
212
|
+
MISTRAL: "mistral",
|
|
213
|
+
OPENAI: "openai",
|
|
214
|
+
OPENAI_AGENTS: "openai-agents",
|
|
215
|
+
OPENAI_CODEX: "openai-codex",
|
|
216
|
+
OPENROUTER: "openrouter",
|
|
217
|
+
OPENROUTER_AGENT: "openrouter-agent",
|
|
218
|
+
PI_CODING_AGENT: "pi-coding-agent",
|
|
219
|
+
STRANDS_AGENT_SDK: "strands-agent-sdk"
|
|
220
|
+
};
|
|
221
|
+
var INTERNAL_SPAN_INSTRUMENTATION_NAME = /* @__PURE__ */ Symbol.for(
|
|
222
|
+
"braintrust.spanInstrumentationName"
|
|
223
|
+
);
|
|
224
|
+
var SDK_VERSION = true ? "3.25.0" : "0.0.0";
|
|
225
|
+
function withSpanInstrumentationName(args, instrumentationName) {
|
|
226
|
+
return {
|
|
227
|
+
...args,
|
|
228
|
+
[INTERNAL_SPAN_INSTRUMENTATION_NAME]: instrumentationName
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
function getSpanInstrumentationName(args) {
|
|
232
|
+
if (typeof args !== "object" || args === null) {
|
|
233
|
+
return void 0;
|
|
234
|
+
}
|
|
235
|
+
const value = args[INTERNAL_SPAN_INSTRUMENTATION_NAME];
|
|
236
|
+
return isSpanInstrumentationName(value) ? value : void 0;
|
|
237
|
+
}
|
|
238
|
+
function detectSpanOriginEnvironment(explicit) {
|
|
239
|
+
if (explicit) return explicit;
|
|
240
|
+
const envType = isomorph_default.getEnv("BRAINTRUST_ENVIRONMENT_TYPE");
|
|
241
|
+
const envName = isomorph_default.getEnv("BRAINTRUST_ENVIRONMENT_NAME");
|
|
242
|
+
if (envType || envName) {
|
|
243
|
+
return {
|
|
244
|
+
...envType ? { type: envType } : {},
|
|
245
|
+
...envName ? { name: envName } : {}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
const ci = firstPresent([
|
|
249
|
+
["GITHUB_ACTIONS", "github_actions"],
|
|
250
|
+
["GITLAB_CI", "gitlab_ci"],
|
|
251
|
+
["CIRCLECI", "circleci"],
|
|
252
|
+
["BUILDKITE", "buildkite"],
|
|
253
|
+
["JENKINS_URL", "jenkins"],
|
|
254
|
+
["JENKINS_HOME", "jenkins"],
|
|
255
|
+
["TF_BUILD", "azure_pipelines"],
|
|
256
|
+
["TEAMCITY_VERSION", "teamcity"],
|
|
257
|
+
["TRAVIS", "travis"],
|
|
258
|
+
["BITBUCKET_BUILD_NUMBER", "bitbucket"]
|
|
259
|
+
]);
|
|
260
|
+
if (ci) return { type: "ci", name: ci };
|
|
261
|
+
if (isomorph_default.getEnv("CI")) return { type: "ci", name: "ci" };
|
|
262
|
+
const earlyServer = firstPresent([
|
|
263
|
+
["VERCEL", "vercel"],
|
|
264
|
+
["NETLIFY", "netlify"]
|
|
265
|
+
]);
|
|
266
|
+
if (earlyServer) return { type: "server", name: earlyServer };
|
|
267
|
+
if (isomorph_default.getEnv("ECS_CONTAINER_METADATA_URI") || isomorph_default.getEnv("ECS_CONTAINER_METADATA_URI_V4")) {
|
|
268
|
+
return { type: "server", name: "ecs" };
|
|
269
|
+
}
|
|
270
|
+
const awsExecutionEnv = isomorph_default.getEnv("AWS_EXECUTION_ENV");
|
|
271
|
+
if (_optionalChain([awsExecutionEnv, 'optionalAccess', _34 => _34.startsWith, 'call', _35 => _35("AWS_ECS_")])) {
|
|
272
|
+
return { type: "server", name: "ecs" };
|
|
273
|
+
}
|
|
274
|
+
if (_optionalChain([awsExecutionEnv, 'optionalAccess', _36 => _36.startsWith, 'call', _37 => _37("AWS_Lambda_")])) {
|
|
275
|
+
return { type: "server", name: "aws_lambda" };
|
|
276
|
+
}
|
|
277
|
+
if (isomorph_default.getEnv("AWS_LAMBDA_FUNCTION_NAME")) {
|
|
278
|
+
return { type: "server", name: "aws_lambda" };
|
|
279
|
+
}
|
|
280
|
+
const server = firstPresent([
|
|
281
|
+
["K_SERVICE", "cloud_run"],
|
|
282
|
+
["FUNCTION_TARGET", "gcp_functions"],
|
|
283
|
+
["KUBERNETES_SERVICE_HOST", "kubernetes"],
|
|
284
|
+
["DYNO", "heroku"],
|
|
285
|
+
["FLY_APP_NAME", "fly"],
|
|
286
|
+
["RAILWAY_ENVIRONMENT", "railway"],
|
|
287
|
+
["RENDER_SERVICE_NAME", "render"]
|
|
288
|
+
]);
|
|
289
|
+
if (server) return { type: "server", name: server };
|
|
290
|
+
return deploymentModeEnvironment("NODE_ENV", isomorph_default.getEnv("NODE_ENV"));
|
|
291
|
+
}
|
|
292
|
+
function makeSpanOrigin(instrumentationName, environment) {
|
|
293
|
+
return {
|
|
294
|
+
name: "braintrust.sdk.javascript",
|
|
295
|
+
version: SDK_VERSION,
|
|
296
|
+
instrumentation: { name: instrumentationName },
|
|
297
|
+
...environment ? { environment } : {}
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
function mergeSpanOriginContext(context, instrumentationName, environment) {
|
|
301
|
+
const next = { ..._nullishCoalesce(context, () => ( {})) };
|
|
302
|
+
const current = isObject(next.span_origin) ? { ...next.span_origin } : {};
|
|
303
|
+
next.span_origin = {
|
|
304
|
+
...makeSpanOrigin(instrumentationName, environment),
|
|
305
|
+
...current
|
|
306
|
+
};
|
|
307
|
+
return next;
|
|
308
|
+
}
|
|
309
|
+
function isSpanInstrumentationName(value) {
|
|
310
|
+
return Object.values(INSTRUMENTATION_NAMES).some((name) => name === value);
|
|
311
|
+
}
|
|
312
|
+
function firstPresent(entries) {
|
|
313
|
+
return _optionalChain([entries, 'access', _38 => _38.find, 'call', _39 => _39(([key]) => Boolean(isomorph_default.getEnv(key))), 'optionalAccess', _40 => _40[1]]);
|
|
314
|
+
}
|
|
315
|
+
function deploymentModeEnvironment(_key, value) {
|
|
316
|
+
if (!value) return void 0;
|
|
317
|
+
const normalized = value.toLowerCase();
|
|
318
|
+
if (normalized === "production" || normalized === "staging") {
|
|
319
|
+
return { type: "server", name: normalized };
|
|
320
|
+
}
|
|
321
|
+
if (normalized === "development" || normalized === "local") {
|
|
322
|
+
return { type: "local", name: normalized };
|
|
323
|
+
}
|
|
324
|
+
return { name: value };
|
|
325
|
+
}
|
|
326
|
+
function isObject(value) {
|
|
327
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
328
|
+
}
|
|
329
|
+
|
|
192
330
|
// src/instrumentation/core/channel-definitions.ts
|
|
193
331
|
function channel(spec) {
|
|
194
332
|
return spec;
|
|
195
333
|
}
|
|
196
|
-
function defineChannels(pkg, channels) {
|
|
334
|
+
function defineChannels(pkg, channels, options) {
|
|
335
|
+
const { instrumentationName } = options;
|
|
197
336
|
return Object.fromEntries(
|
|
198
337
|
Object.entries(channels).map(([key, spec]) => {
|
|
199
338
|
const fullChannelName = `orchestrion:${pkg}:${spec.channelName}`;
|
|
@@ -206,6 +345,7 @@ function defineChannels(pkg, channels) {
|
|
|
206
345
|
key,
|
|
207
346
|
{
|
|
208
347
|
...asyncSpec,
|
|
348
|
+
instrumentationName,
|
|
209
349
|
tracingChannel: tracingChannel2,
|
|
210
350
|
tracePromise: (fn, context) => tracingChannel2().tracePromise(
|
|
211
351
|
fn,
|
|
@@ -223,6 +363,7 @@ function defineChannels(pkg, channels) {
|
|
|
223
363
|
key,
|
|
224
364
|
{
|
|
225
365
|
...syncSpec,
|
|
366
|
+
instrumentationName,
|
|
226
367
|
tracingChannel,
|
|
227
368
|
traceSync: (fn, context) => tracingChannel().traceSync(
|
|
228
369
|
fn,
|
|
@@ -236,160 +377,182 @@ function defineChannels(pkg, channels) {
|
|
|
236
377
|
}
|
|
237
378
|
|
|
238
379
|
// src/instrumentation/plugins/openai-channels.ts
|
|
239
|
-
var openAIChannels = defineChannels(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
380
|
+
var openAIChannels = defineChannels(
|
|
381
|
+
"openai",
|
|
382
|
+
{
|
|
383
|
+
chatCompletionsCreate: channel({
|
|
384
|
+
channelName: "chat.completions.create",
|
|
385
|
+
kind: "async"
|
|
386
|
+
}),
|
|
387
|
+
embeddingsCreate: channel({
|
|
388
|
+
channelName: "embeddings.create",
|
|
389
|
+
kind: "async"
|
|
390
|
+
}),
|
|
391
|
+
betaChatCompletionsParse: channel({
|
|
392
|
+
channelName: "beta.chat.completions.parse",
|
|
393
|
+
kind: "async"
|
|
394
|
+
}),
|
|
395
|
+
betaChatCompletionsStream: channel({
|
|
396
|
+
channelName: "beta.chat.completions.stream",
|
|
397
|
+
kind: "sync-stream"
|
|
398
|
+
}),
|
|
399
|
+
moderationsCreate: channel({
|
|
400
|
+
channelName: "moderations.create",
|
|
401
|
+
kind: "async"
|
|
402
|
+
}),
|
|
403
|
+
responsesCreate: channel({
|
|
404
|
+
channelName: "responses.create",
|
|
405
|
+
kind: "async"
|
|
406
|
+
}),
|
|
407
|
+
responsesStream: channel({
|
|
408
|
+
channelName: "responses.stream",
|
|
409
|
+
kind: "sync-stream"
|
|
410
|
+
}),
|
|
411
|
+
responsesParse: channel({
|
|
412
|
+
channelName: "responses.parse",
|
|
413
|
+
kind: "async"
|
|
414
|
+
}),
|
|
415
|
+
responsesCompact: channel({
|
|
416
|
+
channelName: "responses.compact",
|
|
417
|
+
kind: "async"
|
|
418
|
+
})
|
|
419
|
+
},
|
|
420
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENAI }
|
|
421
|
+
);
|
|
277
422
|
|
|
278
423
|
// src/instrumentation/plugins/openai-codex-channels.ts
|
|
279
|
-
var openAICodexChannels = defineChannels(
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
424
|
+
var openAICodexChannels = defineChannels(
|
|
425
|
+
"@openai/codex-sdk",
|
|
426
|
+
{
|
|
427
|
+
run: channel({
|
|
428
|
+
channelName: "Thread.run",
|
|
429
|
+
kind: "async"
|
|
430
|
+
}),
|
|
431
|
+
runStreamed: channel({
|
|
432
|
+
channelName: "Thread.runStreamed",
|
|
433
|
+
kind: "async"
|
|
434
|
+
})
|
|
435
|
+
},
|
|
436
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENAI_CODEX }
|
|
437
|
+
);
|
|
289
438
|
|
|
290
439
|
// src/instrumentation/plugins/anthropic-channels.ts
|
|
291
|
-
var anthropicChannels = defineChannels(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
440
|
+
var anthropicChannels = defineChannels(
|
|
441
|
+
"@anthropic-ai/sdk",
|
|
442
|
+
{
|
|
443
|
+
messagesCreate: channel({
|
|
444
|
+
channelName: "messages.create",
|
|
445
|
+
kind: "async"
|
|
446
|
+
}),
|
|
447
|
+
betaMessagesCreate: channel({
|
|
448
|
+
channelName: "beta.messages.create",
|
|
449
|
+
kind: "async"
|
|
450
|
+
}),
|
|
451
|
+
betaMessagesToolRunner: channel({
|
|
452
|
+
channelName: "beta.messages.toolRunner",
|
|
453
|
+
kind: "sync-stream"
|
|
454
|
+
})
|
|
455
|
+
},
|
|
456
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.ANTHROPIC }
|
|
457
|
+
);
|
|
305
458
|
|
|
306
459
|
// src/instrumentation/plugins/ai-sdk-channels.ts
|
|
307
|
-
var aiSDKChannels = defineChannels(
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
460
|
+
var aiSDKChannels = defineChannels(
|
|
461
|
+
"ai",
|
|
462
|
+
{
|
|
463
|
+
generateText: channel({
|
|
464
|
+
channelName: "generateText",
|
|
465
|
+
kind: "async"
|
|
466
|
+
}),
|
|
467
|
+
streamText: channel({
|
|
468
|
+
channelName: "streamText",
|
|
469
|
+
kind: "async"
|
|
470
|
+
}),
|
|
471
|
+
streamTextSync: channel({
|
|
472
|
+
channelName: "streamText.sync",
|
|
473
|
+
kind: "sync-stream"
|
|
474
|
+
}),
|
|
475
|
+
generateObject: channel({
|
|
476
|
+
channelName: "generateObject",
|
|
477
|
+
kind: "async"
|
|
478
|
+
}),
|
|
479
|
+
streamObject: channel({
|
|
480
|
+
channelName: "streamObject",
|
|
481
|
+
kind: "async"
|
|
482
|
+
}),
|
|
483
|
+
streamObjectSync: channel({
|
|
484
|
+
channelName: "streamObject.sync",
|
|
485
|
+
kind: "sync-stream"
|
|
486
|
+
}),
|
|
487
|
+
embed: channel({
|
|
334
488
|
channelName: "embed",
|
|
335
489
|
kind: "async"
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
490
|
+
}),
|
|
491
|
+
embedMany: channel({
|
|
492
|
+
channelName: "embedMany",
|
|
493
|
+
kind: "async"
|
|
494
|
+
}),
|
|
495
|
+
rerank: channel({
|
|
496
|
+
channelName: "rerank",
|
|
497
|
+
kind: "async"
|
|
498
|
+
}),
|
|
499
|
+
agentGenerate: channel({
|
|
500
|
+
channelName: "Agent.generate",
|
|
501
|
+
kind: "async"
|
|
502
|
+
}),
|
|
503
|
+
agentStream: channel({
|
|
504
|
+
channelName: "Agent.stream",
|
|
505
|
+
kind: "async"
|
|
506
|
+
}),
|
|
507
|
+
agentStreamSync: channel({
|
|
508
|
+
channelName: "Agent.stream.sync",
|
|
509
|
+
kind: "sync-stream"
|
|
510
|
+
}),
|
|
511
|
+
toolLoopAgentGenerate: channel({
|
|
512
|
+
channelName: "ToolLoopAgent.generate",
|
|
513
|
+
kind: "async"
|
|
514
|
+
}),
|
|
515
|
+
toolLoopAgentStream: channel({
|
|
516
|
+
channelName: "ToolLoopAgent.stream",
|
|
517
|
+
kind: "async"
|
|
518
|
+
}),
|
|
519
|
+
workflowAgentStream: channel({
|
|
520
|
+
channelName: "WorkflowAgent.stream",
|
|
521
|
+
kind: "async"
|
|
522
|
+
}),
|
|
523
|
+
v7CreateTelemetryDispatcher: channel({
|
|
524
|
+
channelName: "createTelemetryDispatcher",
|
|
525
|
+
kind: "sync-stream"
|
|
526
|
+
})
|
|
527
|
+
},
|
|
528
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
|
|
529
|
+
);
|
|
530
|
+
var harnessAgentChannels = defineChannels(
|
|
531
|
+
"@ai-sdk/harness",
|
|
532
|
+
{
|
|
533
|
+
createSession: channel({
|
|
534
|
+
channelName: "HarnessAgent.createSession",
|
|
535
|
+
kind: "async"
|
|
536
|
+
}),
|
|
537
|
+
generate: channel({
|
|
538
|
+
channelName: "HarnessAgent.generate",
|
|
539
|
+
kind: "async"
|
|
540
|
+
}),
|
|
541
|
+
stream: channel({
|
|
542
|
+
channelName: "HarnessAgent.stream",
|
|
543
|
+
kind: "async"
|
|
544
|
+
}),
|
|
545
|
+
continueGenerate: channel({
|
|
546
|
+
channelName: "HarnessAgent.continueGenerate",
|
|
547
|
+
kind: "async"
|
|
548
|
+
}),
|
|
549
|
+
continueStream: channel({
|
|
550
|
+
channelName: "HarnessAgent.continueStream",
|
|
551
|
+
kind: "async"
|
|
552
|
+
})
|
|
553
|
+
},
|
|
554
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
|
|
555
|
+
);
|
|
393
556
|
|
|
394
557
|
// src/instrumentation/plugins/claude-agent-sdk-channels.ts
|
|
395
558
|
var claudeAgentSDKChannels = defineChannels(
|
|
@@ -399,309 +562,374 @@ var claudeAgentSDKChannels = defineChannels(
|
|
|
399
562
|
channelName: "query",
|
|
400
563
|
kind: "sync-stream"
|
|
401
564
|
})
|
|
402
|
-
}
|
|
565
|
+
},
|
|
566
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.CLAUDE_AGENT_SDK }
|
|
403
567
|
);
|
|
404
568
|
|
|
405
569
|
// src/instrumentation/plugins/cursor-sdk-channels.ts
|
|
406
|
-
var cursorSDKChannels = defineChannels(
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
570
|
+
var cursorSDKChannels = defineChannels(
|
|
571
|
+
"@cursor/sdk",
|
|
572
|
+
{
|
|
573
|
+
create: channel({
|
|
574
|
+
channelName: "Agent.create",
|
|
575
|
+
kind: "async"
|
|
576
|
+
}),
|
|
577
|
+
resume: channel({
|
|
578
|
+
channelName: "Agent.resume",
|
|
579
|
+
kind: "async"
|
|
580
|
+
}),
|
|
581
|
+
prompt: channel({
|
|
582
|
+
channelName: "Agent.prompt",
|
|
583
|
+
kind: "async"
|
|
584
|
+
}),
|
|
585
|
+
send: channel({
|
|
586
|
+
channelName: "agent.send",
|
|
587
|
+
kind: "async"
|
|
588
|
+
})
|
|
589
|
+
},
|
|
590
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.CURSOR_SDK }
|
|
591
|
+
);
|
|
424
592
|
|
|
425
593
|
// src/instrumentation/plugins/google-genai-channels.ts
|
|
426
|
-
var googleGenAIChannels = defineChannels(
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
594
|
+
var googleGenAIChannels = defineChannels(
|
|
595
|
+
"@google/genai",
|
|
596
|
+
{
|
|
597
|
+
generateContent: channel({
|
|
598
|
+
channelName: "models.generateContent",
|
|
599
|
+
kind: "async"
|
|
600
|
+
}),
|
|
601
|
+
generateContentStream: channel({
|
|
602
|
+
channelName: "models.generateContentStream",
|
|
603
|
+
kind: "async"
|
|
604
|
+
}),
|
|
605
|
+
embedContent: channel({
|
|
606
|
+
channelName: "models.embedContent",
|
|
607
|
+
kind: "async"
|
|
608
|
+
}),
|
|
609
|
+
interactionsCreate: channel({
|
|
610
|
+
channelName: "interactions.create",
|
|
611
|
+
kind: "async"
|
|
612
|
+
})
|
|
613
|
+
},
|
|
614
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENAI }
|
|
615
|
+
);
|
|
444
616
|
|
|
445
617
|
// src/instrumentation/plugins/huggingface-channels.ts
|
|
446
|
-
var huggingFaceChannels = defineChannels(
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
618
|
+
var huggingFaceChannels = defineChannels(
|
|
619
|
+
"@huggingface/inference",
|
|
620
|
+
{
|
|
621
|
+
chatCompletion: channel({
|
|
622
|
+
channelName: "chatCompletion",
|
|
623
|
+
kind: "async"
|
|
624
|
+
}),
|
|
625
|
+
chatCompletionStream: channel({
|
|
626
|
+
channelName: "chatCompletionStream",
|
|
627
|
+
kind: "sync-stream"
|
|
628
|
+
}),
|
|
629
|
+
textGeneration: channel({
|
|
630
|
+
channelName: "textGeneration",
|
|
631
|
+
kind: "async"
|
|
632
|
+
}),
|
|
633
|
+
textGenerationStream: channel({
|
|
634
|
+
channelName: "textGenerationStream",
|
|
635
|
+
kind: "sync-stream"
|
|
636
|
+
}),
|
|
637
|
+
featureExtraction: channel({
|
|
638
|
+
channelName: "featureExtraction",
|
|
639
|
+
kind: "async"
|
|
640
|
+
})
|
|
641
|
+
},
|
|
642
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.HUGGINGFACE }
|
|
643
|
+
);
|
|
468
644
|
|
|
469
645
|
// src/instrumentation/plugins/openrouter-agent-channels.ts
|
|
470
|
-
var openRouterAgentChannels = defineChannels(
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
646
|
+
var openRouterAgentChannels = defineChannels(
|
|
647
|
+
"@openrouter/agent",
|
|
648
|
+
{
|
|
649
|
+
callModel: channel({
|
|
650
|
+
channelName: "callModel",
|
|
651
|
+
kind: "sync-stream"
|
|
652
|
+
}),
|
|
653
|
+
callModelTurn: channel({
|
|
654
|
+
channelName: "callModel.turn",
|
|
655
|
+
kind: "async"
|
|
656
|
+
}),
|
|
657
|
+
toolExecute: channel({
|
|
658
|
+
channelName: "tool.execute",
|
|
659
|
+
kind: "async"
|
|
660
|
+
})
|
|
661
|
+
},
|
|
662
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER_AGENT }
|
|
663
|
+
);
|
|
484
664
|
|
|
485
665
|
// src/instrumentation/plugins/openrouter-channels.ts
|
|
486
|
-
var openRouterChannels = defineChannels(
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
666
|
+
var openRouterChannels = defineChannels(
|
|
667
|
+
"@openrouter/sdk",
|
|
668
|
+
{
|
|
669
|
+
chatSend: channel({
|
|
670
|
+
channelName: "chat.send",
|
|
671
|
+
kind: "async"
|
|
672
|
+
}),
|
|
673
|
+
embeddingsGenerate: channel({
|
|
674
|
+
channelName: "embeddings.generate",
|
|
675
|
+
kind: "async"
|
|
676
|
+
}),
|
|
677
|
+
rerankRerank: channel({
|
|
497
678
|
channelName: "rerank.rerank",
|
|
498
679
|
kind: "async"
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
}
|
|
680
|
+
}),
|
|
681
|
+
betaResponsesSend: channel({
|
|
682
|
+
channelName: "beta.responses.send",
|
|
683
|
+
kind: "async"
|
|
684
|
+
}),
|
|
685
|
+
callModel: channel({
|
|
686
|
+
channelName: "callModel",
|
|
687
|
+
kind: "sync-stream"
|
|
688
|
+
}),
|
|
689
|
+
callModelTurn: channel({
|
|
690
|
+
channelName: "callModel.turn",
|
|
691
|
+
kind: "async"
|
|
692
|
+
}),
|
|
693
|
+
toolExecute: channel({
|
|
694
|
+
channelName: "tool.execute",
|
|
695
|
+
kind: "async"
|
|
696
|
+
})
|
|
697
|
+
},
|
|
698
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER }
|
|
699
|
+
);
|
|
518
700
|
|
|
519
701
|
// src/instrumentation/plugins/mistral-channels.ts
|
|
520
|
-
var mistralChannels = defineChannels(
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
702
|
+
var mistralChannels = defineChannels(
|
|
703
|
+
"@mistralai/mistralai",
|
|
704
|
+
{
|
|
705
|
+
chatComplete: channel({
|
|
706
|
+
channelName: "chat.complete",
|
|
707
|
+
kind: "async"
|
|
708
|
+
}),
|
|
709
|
+
chatStream: channel({
|
|
710
|
+
channelName: "chat.stream",
|
|
711
|
+
kind: "async"
|
|
712
|
+
}),
|
|
713
|
+
embeddingsCreate: channel({
|
|
714
|
+
channelName: "embeddings.create",
|
|
715
|
+
kind: "async"
|
|
716
|
+
}),
|
|
717
|
+
classifiersModerate: channel({
|
|
718
|
+
channelName: "classifiers.moderate",
|
|
719
|
+
kind: "async"
|
|
720
|
+
}),
|
|
721
|
+
classifiersModerateChat: channel({
|
|
722
|
+
channelName: "classifiers.moderateChat",
|
|
723
|
+
kind: "async"
|
|
724
|
+
}),
|
|
725
|
+
classifiersClassify: channel({
|
|
726
|
+
channelName: "classifiers.classify",
|
|
727
|
+
kind: "async"
|
|
728
|
+
}),
|
|
729
|
+
classifiersClassifyChat: channel({
|
|
730
|
+
channelName: "classifiers.classifyChat",
|
|
731
|
+
kind: "async"
|
|
732
|
+
}),
|
|
733
|
+
fimComplete: channel({
|
|
734
|
+
channelName: "fim.complete",
|
|
735
|
+
kind: "async"
|
|
736
|
+
}),
|
|
737
|
+
fimStream: channel({
|
|
738
|
+
channelName: "fim.stream",
|
|
739
|
+
kind: "async"
|
|
740
|
+
}),
|
|
741
|
+
agentsComplete: channel({
|
|
742
|
+
channelName: "agents.complete",
|
|
743
|
+
kind: "async"
|
|
744
|
+
}),
|
|
745
|
+
agentsStream: channel({
|
|
746
|
+
channelName: "agents.stream",
|
|
747
|
+
kind: "async"
|
|
748
|
+
})
|
|
749
|
+
},
|
|
750
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.MISTRAL }
|
|
751
|
+
);
|
|
566
752
|
|
|
567
753
|
// src/instrumentation/plugins/google-adk-channels.ts
|
|
568
|
-
var googleADKChannels = defineChannels(
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
754
|
+
var googleADKChannels = defineChannels(
|
|
755
|
+
"@google/adk",
|
|
756
|
+
{
|
|
757
|
+
runnerRunAsync: channel({
|
|
758
|
+
channelName: "runner.runAsync",
|
|
759
|
+
kind: "sync-stream"
|
|
760
|
+
}),
|
|
761
|
+
agentRunAsync: channel({
|
|
762
|
+
channelName: "agent.runAsync",
|
|
763
|
+
kind: "sync-stream"
|
|
764
|
+
}),
|
|
765
|
+
toolRunAsync: channel({
|
|
766
|
+
channelName: "tool.runAsync",
|
|
767
|
+
kind: "async"
|
|
768
|
+
})
|
|
769
|
+
},
|
|
770
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_ADK }
|
|
771
|
+
);
|
|
582
772
|
|
|
583
773
|
// src/instrumentation/plugins/cohere-channels.ts
|
|
584
|
-
var cohereChannels = defineChannels(
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
774
|
+
var cohereChannels = defineChannels(
|
|
775
|
+
"cohere-ai",
|
|
776
|
+
{
|
|
777
|
+
chat: channel({
|
|
778
|
+
channelName: "chat",
|
|
779
|
+
kind: "async"
|
|
780
|
+
}),
|
|
781
|
+
chatStream: channel({
|
|
782
|
+
channelName: "chatStream",
|
|
783
|
+
kind: "async"
|
|
784
|
+
}),
|
|
785
|
+
embed: channel({
|
|
786
|
+
channelName: "embed",
|
|
787
|
+
kind: "async"
|
|
788
|
+
}),
|
|
789
|
+
rerank: channel({
|
|
790
|
+
channelName: "rerank",
|
|
791
|
+
kind: "async"
|
|
792
|
+
})
|
|
793
|
+
},
|
|
794
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.COHERE }
|
|
795
|
+
);
|
|
602
796
|
|
|
603
797
|
// src/instrumentation/plugins/groq-channels.ts
|
|
604
|
-
var groqChannels = defineChannels(
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
798
|
+
var groqChannels = defineChannels(
|
|
799
|
+
"groq-sdk",
|
|
800
|
+
{
|
|
801
|
+
chatCompletionsCreate: channel({
|
|
802
|
+
channelName: "chat.completions.create",
|
|
803
|
+
kind: "async"
|
|
804
|
+
}),
|
|
805
|
+
embeddingsCreate: channel({
|
|
611
806
|
channelName: "embeddings.create",
|
|
612
807
|
kind: "async"
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
}
|
|
808
|
+
})
|
|
809
|
+
},
|
|
810
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GROQ }
|
|
811
|
+
);
|
|
616
812
|
|
|
617
813
|
// src/instrumentation/plugins/bedrock-runtime-channels.ts
|
|
618
814
|
var clientSendChannel = channel({
|
|
619
815
|
channelName: "client.send",
|
|
620
816
|
kind: "async"
|
|
621
817
|
});
|
|
622
|
-
var bedrockRuntimeChannels = defineChannels(
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
818
|
+
var bedrockRuntimeChannels = defineChannels(
|
|
819
|
+
"aws-bedrock-runtime",
|
|
820
|
+
{
|
|
821
|
+
clientSend: clientSendChannel
|
|
822
|
+
},
|
|
823
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
|
|
824
|
+
);
|
|
825
|
+
var smithyCoreChannels = defineChannels(
|
|
826
|
+
"@smithy/core",
|
|
827
|
+
{
|
|
828
|
+
clientSend: clientSendChannel
|
|
829
|
+
},
|
|
830
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
|
|
831
|
+
);
|
|
832
|
+
var smithyClientChannels = defineChannels(
|
|
833
|
+
"@smithy/smithy-client",
|
|
834
|
+
{
|
|
835
|
+
clientSend: clientSendChannel
|
|
836
|
+
},
|
|
837
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
|
|
838
|
+
);
|
|
631
839
|
|
|
632
840
|
// src/instrumentation/plugins/genkit-channels.ts
|
|
633
|
-
var genkitChannels = defineChannels(
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
841
|
+
var genkitChannels = defineChannels(
|
|
842
|
+
"@genkit-ai/ai",
|
|
843
|
+
{
|
|
844
|
+
generate: channel({
|
|
845
|
+
channelName: "generate",
|
|
846
|
+
kind: "async"
|
|
847
|
+
}),
|
|
848
|
+
generateStream: channel({
|
|
849
|
+
channelName: "generateStream",
|
|
850
|
+
kind: "sync-stream"
|
|
851
|
+
}),
|
|
852
|
+
embed: channel({
|
|
853
|
+
channelName: "embed",
|
|
854
|
+
kind: "async"
|
|
855
|
+
}),
|
|
856
|
+
embedMany: channel({
|
|
857
|
+
channelName: "embedMany",
|
|
858
|
+
kind: "async"
|
|
859
|
+
}),
|
|
860
|
+
actionRun: channel({
|
|
861
|
+
channelName: "action.run",
|
|
862
|
+
kind: "async"
|
|
863
|
+
}),
|
|
864
|
+
actionStream: channel({
|
|
865
|
+
channelName: "action.stream",
|
|
866
|
+
kind: "sync-stream"
|
|
867
|
+
})
|
|
868
|
+
},
|
|
869
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
|
|
870
|
+
);
|
|
871
|
+
var genkitCoreChannels = defineChannels(
|
|
872
|
+
"@genkit-ai/core",
|
|
873
|
+
{
|
|
874
|
+
actionSpan: channel({
|
|
875
|
+
channelName: "action.span",
|
|
876
|
+
kind: "async"
|
|
877
|
+
})
|
|
878
|
+
},
|
|
879
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
|
|
880
|
+
);
|
|
665
881
|
|
|
666
882
|
// src/instrumentation/plugins/github-copilot-channels.ts
|
|
667
|
-
var gitHubCopilotChannels = defineChannels(
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
883
|
+
var gitHubCopilotChannels = defineChannels(
|
|
884
|
+
"@github/copilot-sdk",
|
|
885
|
+
{
|
|
886
|
+
createSession: channel({
|
|
887
|
+
channelName: "client.createSession",
|
|
888
|
+
kind: "async"
|
|
889
|
+
}),
|
|
890
|
+
resumeSession: channel({
|
|
891
|
+
channelName: "client.resumeSession",
|
|
892
|
+
kind: "async"
|
|
893
|
+
}),
|
|
894
|
+
sendAndWait: channel({
|
|
895
|
+
channelName: "session.sendAndWait",
|
|
896
|
+
kind: "async"
|
|
897
|
+
})
|
|
898
|
+
},
|
|
899
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GITHUB_COPILOT }
|
|
900
|
+
);
|
|
681
901
|
|
|
682
902
|
// src/instrumentation/plugins/flue-channels.ts
|
|
683
|
-
var flueChannels = defineChannels(
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
903
|
+
var flueChannels = defineChannels(
|
|
904
|
+
"@flue/runtime",
|
|
905
|
+
{
|
|
906
|
+
createContext: channel({
|
|
907
|
+
channelName: "createFlueContext",
|
|
908
|
+
kind: "sync-stream"
|
|
909
|
+
})
|
|
910
|
+
},
|
|
911
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.FLUE }
|
|
912
|
+
);
|
|
689
913
|
|
|
690
914
|
// src/instrumentation/plugins/langsmith-channels.ts
|
|
691
|
-
var langSmithChannels = defineChannels(
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
915
|
+
var langSmithChannels = defineChannels(
|
|
916
|
+
"langsmith",
|
|
917
|
+
{
|
|
918
|
+
createRun: channel({
|
|
919
|
+
channelName: "Client.createRun",
|
|
920
|
+
kind: "async"
|
|
921
|
+
}),
|
|
922
|
+
updateRun: channel({
|
|
923
|
+
channelName: "Client.updateRun",
|
|
924
|
+
kind: "async"
|
|
925
|
+
}),
|
|
926
|
+
batchIngestRuns: channel({
|
|
927
|
+
channelName: "Client.batchIngestRuns",
|
|
928
|
+
kind: "async"
|
|
929
|
+
})
|
|
930
|
+
},
|
|
931
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.LANGSMITH }
|
|
932
|
+
);
|
|
705
933
|
|
|
706
934
|
// src/instrumentation/plugins/pi-coding-agent-channels.ts
|
|
707
935
|
var piCodingAgentChannels = defineChannels(
|
|
@@ -711,24 +939,29 @@ var piCodingAgentChannels = defineChannels(
|
|
|
711
939
|
channelName: "AgentSession.prompt",
|
|
712
940
|
kind: "async"
|
|
713
941
|
})
|
|
714
|
-
}
|
|
942
|
+
},
|
|
943
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.PI_CODING_AGENT }
|
|
715
944
|
);
|
|
716
945
|
|
|
717
946
|
// src/instrumentation/plugins/strands-agent-sdk-channels.ts
|
|
718
|
-
var strandsAgentSDKChannels = defineChannels(
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
947
|
+
var strandsAgentSDKChannels = defineChannels(
|
|
948
|
+
"@strands-agents/sdk",
|
|
949
|
+
{
|
|
950
|
+
agentStream: channel({
|
|
951
|
+
channelName: "Agent.stream",
|
|
952
|
+
kind: "sync-stream"
|
|
953
|
+
}),
|
|
954
|
+
graphStream: channel({
|
|
955
|
+
channelName: "Graph.stream",
|
|
956
|
+
kind: "sync-stream"
|
|
957
|
+
}),
|
|
958
|
+
swarmStream: channel({
|
|
959
|
+
channelName: "Swarm.stream",
|
|
960
|
+
kind: "sync-stream"
|
|
961
|
+
})
|
|
962
|
+
},
|
|
963
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.STRANDS_AGENT_SDK }
|
|
964
|
+
);
|
|
732
965
|
|
|
733
966
|
// src/instrumentation/config.ts
|
|
734
967
|
var envIntegrationAliases = {
|
|
@@ -842,7 +1075,7 @@ function readDisabledInstrumentationEnvConfig(disabledList) {
|
|
|
842
1075
|
return { integrations };
|
|
843
1076
|
}
|
|
844
1077
|
function isInstrumentationIntegrationDisabled(integrations, ...names) {
|
|
845
|
-
return names.some((name) => _optionalChain([integrations, 'optionalAccess',
|
|
1078
|
+
return names.some((name) => _optionalChain([integrations, 'optionalAccess', _41 => _41[name]]) === false);
|
|
846
1079
|
}
|
|
847
1080
|
|
|
848
1081
|
// src/auto-instrumentations/loader/mastra-observability-patch.ts
|
|
@@ -1019,36 +1252,49 @@ function patchMastraSource(source, target, format) {
|
|
|
1019
1252
|
}
|
|
1020
1253
|
|
|
1021
1254
|
// src/instrumentation/plugins/openai-agents-channels.ts
|
|
1022
|
-
var openAIAgentsCoreChannels = defineChannels(
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1255
|
+
var openAIAgentsCoreChannels = defineChannels(
|
|
1256
|
+
"@openai/agents-core",
|
|
1257
|
+
{
|
|
1258
|
+
onTraceStart: channel({
|
|
1259
|
+
channelName: "tracing.processor.onTraceStart",
|
|
1260
|
+
kind: "async"
|
|
1261
|
+
}),
|
|
1262
|
+
onTraceEnd: channel({
|
|
1263
|
+
channelName: "tracing.processor.onTraceEnd",
|
|
1264
|
+
kind: "async"
|
|
1265
|
+
}),
|
|
1266
|
+
onSpanStart: channel({
|
|
1267
|
+
channelName: "tracing.processor.onSpanStart",
|
|
1268
|
+
kind: "async"
|
|
1269
|
+
}),
|
|
1270
|
+
onSpanEnd: channel({
|
|
1271
|
+
channelName: "tracing.processor.onSpanEnd",
|
|
1272
|
+
kind: "async"
|
|
1273
|
+
})
|
|
1274
|
+
},
|
|
1275
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.OPENAI_AGENTS }
|
|
1276
|
+
);
|
|
1040
1277
|
|
|
1041
1278
|
// src/instrumentation/plugins/langchain-channels.ts
|
|
1042
|
-
var langChainChannels = defineChannels(
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1279
|
+
var langChainChannels = defineChannels(
|
|
1280
|
+
"@langchain/core",
|
|
1281
|
+
{
|
|
1282
|
+
configure: channel({
|
|
1283
|
+
channelName: "CallbackManager.configure",
|
|
1284
|
+
kind: "sync-stream"
|
|
1285
|
+
}),
|
|
1286
|
+
configureSync: channel({
|
|
1287
|
+
channelName: "CallbackManager._configureSync",
|
|
1288
|
+
kind: "sync-stream"
|
|
1289
|
+
})
|
|
1290
|
+
},
|
|
1291
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.LANGCHAIN }
|
|
1292
|
+
);
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
|
|
1052
1298
|
|
|
1053
1299
|
|
|
1054
1300
|
|
|
@@ -1087,4 +1333,4 @@ var langChainChannels = defineChannels("@langchain/core", {
|
|
|
1087
1333
|
|
|
1088
1334
|
|
|
1089
1335
|
|
|
1090
|
-
exports.__export = __export; exports.patchTracingChannel = patchTracingChannel; exports.isomorph_default = isomorph_default; exports.openAIChannels = openAIChannels; exports.openAICodexChannels = openAICodexChannels; exports.anthropicChannels = anthropicChannels; exports.aiSDKChannels = aiSDKChannels; exports.harnessAgentChannels = harnessAgentChannels; exports.claudeAgentSDKChannels = claudeAgentSDKChannels; exports.cursorSDKChannels = cursorSDKChannels; exports.openAIAgentsCoreChannels = openAIAgentsCoreChannels; exports.googleGenAIChannels = googleGenAIChannels; exports.huggingFaceChannels = huggingFaceChannels; exports.openRouterAgentChannels = openRouterAgentChannels; exports.openRouterChannels = openRouterChannels; exports.mistralChannels = mistralChannels; 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.getDefaultInstrumentationIntegrations = getDefaultInstrumentationIntegrations; exports.readDisabledInstrumentationEnvConfig = readDisabledInstrumentationEnvConfig; exports.isInstrumentationIntegrationDisabled = isInstrumentationIntegrationDisabled; exports.installMastraExporterFactory = installMastraExporterFactory; exports.classifyMastraTarget = classifyMastraTarget; exports.patchMastraSource = patchMastraSource;
|
|
1336
|
+
exports.__export = __export; exports.patchTracingChannel = patchTracingChannel; 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.cursorSDKChannels = cursorSDKChannels; exports.openAIAgentsCoreChannels = openAIAgentsCoreChannels; exports.googleGenAIChannels = googleGenAIChannels; exports.huggingFaceChannels = huggingFaceChannels; exports.openRouterAgentChannels = openRouterAgentChannels; exports.openRouterChannels = openRouterChannels; exports.mistralChannels = mistralChannels; 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.getDefaultInstrumentationIntegrations = getDefaultInstrumentationIntegrations; exports.readDisabledInstrumentationEnvConfig = readDisabledInstrumentationEnvConfig; exports.isInstrumentationIntegrationDisabled = isInstrumentationIntegrationDisabled; exports.installMastraExporterFactory = installMastraExporterFactory; exports.classifyMastraTarget = classifyMastraTarget; exports.patchMastraSource = patchMastraSource;
|