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.
Files changed (47) hide show
  1. package/dev/dist/index.d.mts +5 -0
  2. package/dev/dist/index.d.ts +5 -0
  3. package/dev/dist/index.js +2614 -1567
  4. package/dev/dist/index.mjs +2037 -990
  5. package/dist/apply-auto-instrumentation.js +200 -199
  6. package/dist/apply-auto-instrumentation.mjs +8 -7
  7. package/dist/auto-instrumentations/bundler/esbuild.cjs +596 -462
  8. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/next.cjs +596 -462
  10. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  11. package/dist/auto-instrumentations/bundler/rollup.cjs +596 -462
  12. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  13. package/dist/auto-instrumentations/bundler/vite.cjs +596 -462
  14. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  15. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +596 -462
  16. package/dist/auto-instrumentations/bundler/webpack.cjs +596 -462
  17. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  18. package/dist/auto-instrumentations/{chunk-BURMPO7L.mjs → chunk-7P6563SW.mjs} +1 -1
  19. package/dist/auto-instrumentations/{chunk-F43DNLPD.mjs → chunk-CZ24KNHT.mjs} +569 -442
  20. package/dist/auto-instrumentations/{chunk-GSZHTAQW.mjs → chunk-JPVCUKTY.mjs} +30 -21
  21. package/dist/auto-instrumentations/hook.mjs +648 -476
  22. package/dist/auto-instrumentations/index.cjs +568 -442
  23. package/dist/auto-instrumentations/index.mjs +1 -1
  24. package/dist/browser.d.mts +7 -0
  25. package/dist/browser.d.ts +7 -0
  26. package/dist/browser.js +2022 -971
  27. package/dist/browser.mjs +2022 -971
  28. package/dist/{chunk-XE5FS7QY.mjs → chunk-2SANLSWX.mjs} +1375 -597
  29. package/dist/{chunk-7F6GCRHH.mjs → chunk-ABR2QWDP.mjs} +702 -456
  30. package/dist/{chunk-SU6EHKJV.js → chunk-GSIDVFE6.js} +2176 -1398
  31. package/dist/{chunk-7AUY2XWX.js → chunk-P25IOOU4.js} +704 -458
  32. package/dist/cli.js +2005 -958
  33. package/dist/edge-light.js +2022 -971
  34. package/dist/edge-light.mjs +2022 -971
  35. package/dist/index.d.mts +7 -0
  36. package/dist/index.d.ts +7 -0
  37. package/dist/index.js +447 -402
  38. package/dist/index.mjs +72 -27
  39. package/dist/instrumentation/index.d.mts +5 -0
  40. package/dist/instrumentation/index.d.ts +5 -0
  41. package/dist/instrumentation/index.js +1990 -981
  42. package/dist/instrumentation/index.mjs +1990 -981
  43. package/dist/vitest-evals-reporter.js +16 -16
  44. package/dist/vitest-evals-reporter.mjs +2 -2
  45. package/dist/workerd.js +2022 -971
  46. package/dist/workerd.mjs +2022 -971
  47. package/package.json +2 -2
@@ -147,7 +147,8 @@ var isomorph_default = iso;
147
147
  function channel(spec) {
148
148
  return spec;
149
149
  }
150
- function defineChannels(pkg, channels) {
150
+ function defineChannels(pkg, channels, options) {
151
+ const { instrumentationName } = options;
151
152
  return Object.fromEntries(
152
153
  Object.entries(channels).map(([key, spec]) => {
153
154
  const fullChannelName = `orchestrion:${pkg}:${spec.channelName}`;
@@ -160,6 +161,7 @@ function defineChannels(pkg, channels) {
160
161
  key,
161
162
  {
162
163
  ...asyncSpec,
164
+ instrumentationName,
163
165
  tracingChannel: tracingChannel2,
164
166
  tracePromise: (fn, context) => tracingChannel2().tracePromise(
165
167
  fn,
@@ -177,6 +179,7 @@ function defineChannels(pkg, channels) {
177
179
  key,
178
180
  {
179
181
  ...syncSpec,
182
+ instrumentationName,
180
183
  tracingChannel,
181
184
  traceSync: (fn, context) => tracingChannel().traceSync(
182
185
  fn,
@@ -189,45 +192,79 @@ function defineChannels(pkg, channels) {
189
192
  );
190
193
  }
191
194
 
195
+ // src/span-origin.ts
196
+ var INSTRUMENTATION_NAMES = {
197
+ AI_SDK: "ai-sdk",
198
+ ANTHROPIC: "anthropic",
199
+ BEDROCK_RUNTIME: "bedrock-runtime",
200
+ BRAINTRUST_JS_LOGGER: "braintrust-js-logger",
201
+ CLAUDE_AGENT_SDK: "claude-agent-sdk",
202
+ COHERE: "cohere",
203
+ CURSOR_SDK: "cursor-sdk",
204
+ EVE: "eve",
205
+ FLUE: "flue",
206
+ GENKIT: "genkit",
207
+ GITHUB_COPILOT: "github-copilot",
208
+ GOOGLE_ADK: "google-adk",
209
+ GOOGLE_GENAI: "google-genai",
210
+ GROQ: "groq",
211
+ HUGGINGFACE: "huggingface",
212
+ LANGCHAIN: "langchain",
213
+ LANGSMITH: "langsmith",
214
+ MASTRA: "mastra",
215
+ MISTRAL: "mistral",
216
+ OPENAI: "openai",
217
+ OPENAI_AGENTS: "openai-agents",
218
+ OPENAI_CODEX: "openai-codex",
219
+ OPENROUTER: "openrouter",
220
+ OPENROUTER_AGENT: "openrouter-agent",
221
+ PI_CODING_AGENT: "pi-coding-agent",
222
+ STRANDS_AGENT_SDK: "strands-agent-sdk"
223
+ };
224
+
192
225
  // src/instrumentation/plugins/openai-channels.ts
193
- var openAIChannels = defineChannels("openai", {
194
- chatCompletionsCreate: channel({
195
- channelName: "chat.completions.create",
196
- kind: "async"
197
- }),
198
- embeddingsCreate: channel({
199
- channelName: "embeddings.create",
200
- kind: "async"
201
- }),
202
- betaChatCompletionsParse: channel({
203
- channelName: "beta.chat.completions.parse",
204
- kind: "async"
205
- }),
206
- betaChatCompletionsStream: channel({
207
- channelName: "beta.chat.completions.stream",
208
- kind: "sync-stream"
209
- }),
210
- moderationsCreate: channel({
211
- channelName: "moderations.create",
212
- kind: "async"
213
- }),
214
- responsesCreate: channel({
215
- channelName: "responses.create",
216
- kind: "async"
217
- }),
218
- responsesStream: channel({
219
- channelName: "responses.stream",
220
- kind: "sync-stream"
221
- }),
222
- responsesParse: channel({
223
- channelName: "responses.parse",
224
- kind: "async"
225
- }),
226
- responsesCompact: channel({
227
- channelName: "responses.compact",
228
- kind: "async"
229
- })
230
- });
226
+ var openAIChannels = defineChannels(
227
+ "openai",
228
+ {
229
+ chatCompletionsCreate: channel({
230
+ channelName: "chat.completions.create",
231
+ kind: "async"
232
+ }),
233
+ embeddingsCreate: channel({
234
+ channelName: "embeddings.create",
235
+ kind: "async"
236
+ }),
237
+ betaChatCompletionsParse: channel({
238
+ channelName: "beta.chat.completions.parse",
239
+ kind: "async"
240
+ }),
241
+ betaChatCompletionsStream: channel({
242
+ channelName: "beta.chat.completions.stream",
243
+ kind: "sync-stream"
244
+ }),
245
+ moderationsCreate: channel({
246
+ channelName: "moderations.create",
247
+ kind: "async"
248
+ }),
249
+ responsesCreate: channel({
250
+ channelName: "responses.create",
251
+ kind: "async"
252
+ }),
253
+ responsesStream: channel({
254
+ channelName: "responses.stream",
255
+ kind: "sync-stream"
256
+ }),
257
+ responsesParse: channel({
258
+ channelName: "responses.parse",
259
+ kind: "async"
260
+ }),
261
+ responsesCompact: channel({
262
+ channelName: "responses.compact",
263
+ kind: "async"
264
+ })
265
+ },
266
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENAI }
267
+ );
231
268
 
232
269
  // src/auto-instrumentations/configs/openai.ts
233
270
  var openaiConfigs = [
@@ -409,16 +446,20 @@ var openaiConfigs = [
409
446
  ];
410
447
 
411
448
  // src/instrumentation/plugins/openai-codex-channels.ts
412
- var openAICodexChannels = defineChannels("@openai/codex-sdk", {
413
- run: channel({
414
- channelName: "Thread.run",
415
- kind: "async"
416
- }),
417
- runStreamed: channel({
418
- channelName: "Thread.runStreamed",
419
- kind: "async"
420
- })
421
- });
449
+ var openAICodexChannels = defineChannels(
450
+ "@openai/codex-sdk",
451
+ {
452
+ run: channel({
453
+ channelName: "Thread.run",
454
+ kind: "async"
455
+ }),
456
+ runStreamed: channel({
457
+ channelName: "Thread.runStreamed",
458
+ kind: "async"
459
+ })
460
+ },
461
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENAI_CODEX }
462
+ );
422
463
 
423
464
  // src/auto-instrumentations/configs/openai-codex.ts
424
465
  var openAICodexVersionRange = ">=0.128.0 <1.0.0";
@@ -452,20 +493,24 @@ var openAICodexConfigs = [
452
493
  ];
453
494
 
454
495
  // src/instrumentation/plugins/anthropic-channels.ts
455
- var anthropicChannels = defineChannels("@anthropic-ai/sdk", {
456
- messagesCreate: channel({
457
- channelName: "messages.create",
458
- kind: "async"
459
- }),
460
- betaMessagesCreate: channel({
461
- channelName: "beta.messages.create",
462
- kind: "async"
463
- }),
464
- betaMessagesToolRunner: channel({
465
- channelName: "beta.messages.toolRunner",
466
- kind: "sync-stream"
467
- })
468
- });
496
+ var anthropicChannels = defineChannels(
497
+ "@anthropic-ai/sdk",
498
+ {
499
+ messagesCreate: channel({
500
+ channelName: "messages.create",
501
+ kind: "async"
502
+ }),
503
+ betaMessagesCreate: channel({
504
+ channelName: "beta.messages.create",
505
+ kind: "async"
506
+ }),
507
+ betaMessagesToolRunner: channel({
508
+ channelName: "beta.messages.toolRunner",
509
+ kind: "sync-stream"
510
+ })
511
+ },
512
+ { instrumentationName: INSTRUMENTATION_NAMES.ANTHROPIC }
513
+ );
469
514
 
470
515
  // src/auto-instrumentations/configs/anthropic.ts
471
516
  var anthropicConfigs = [
@@ -588,15 +633,27 @@ var clientSendChannel = channel({
588
633
  channelName: "client.send",
589
634
  kind: "async"
590
635
  });
591
- var bedrockRuntimeChannels = defineChannels("aws-bedrock-runtime", {
592
- clientSend: clientSendChannel
593
- });
594
- var smithyCoreChannels = defineChannels("@smithy/core", {
595
- clientSend: clientSendChannel
596
- });
597
- var smithyClientChannels = defineChannels("@smithy/smithy-client", {
598
- clientSend: clientSendChannel
599
- });
636
+ var bedrockRuntimeChannels = defineChannels(
637
+ "aws-bedrock-runtime",
638
+ {
639
+ clientSend: clientSendChannel
640
+ },
641
+ { instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
642
+ );
643
+ var smithyCoreChannels = defineChannels(
644
+ "@smithy/core",
645
+ {
646
+ clientSend: clientSendChannel
647
+ },
648
+ { instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
649
+ );
650
+ var smithyClientChannels = defineChannels(
651
+ "@smithy/smithy-client",
652
+ {
653
+ clientSend: clientSendChannel
654
+ },
655
+ { instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
656
+ );
600
657
 
601
658
  // src/auto-instrumentations/configs/bedrock-runtime.ts
602
659
  var bedrockRuntimeConfigs = [
@@ -655,92 +712,102 @@ var bedrockRuntimeConfigs = [
655
712
  ];
656
713
 
657
714
  // src/instrumentation/plugins/ai-sdk-channels.ts
658
- var aiSDKChannels = defineChannels("ai", {
659
- generateText: channel({
660
- channelName: "generateText",
661
- kind: "async"
662
- }),
663
- streamText: channel({
664
- channelName: "streamText",
665
- kind: "async"
666
- }),
667
- streamTextSync: channel({
668
- channelName: "streamText.sync",
669
- kind: "sync-stream"
670
- }),
671
- generateObject: channel({
672
- channelName: "generateObject",
673
- kind: "async"
674
- }),
675
- streamObject: channel({
676
- channelName: "streamObject",
677
- kind: "async"
678
- }),
679
- streamObjectSync: channel({
680
- channelName: "streamObject.sync",
681
- kind: "sync-stream"
682
- }),
683
- embed: channel(
684
- {
715
+ var aiSDKChannels = defineChannels(
716
+ "ai",
717
+ {
718
+ generateText: channel({
719
+ channelName: "generateText",
720
+ kind: "async"
721
+ }),
722
+ streamText: channel({
723
+ channelName: "streamText",
724
+ kind: "async"
725
+ }),
726
+ streamTextSync: channel({
727
+ channelName: "streamText.sync",
728
+ kind: "sync-stream"
729
+ }),
730
+ generateObject: channel({
731
+ channelName: "generateObject",
732
+ kind: "async"
733
+ }),
734
+ streamObject: channel({
735
+ channelName: "streamObject",
736
+ kind: "async"
737
+ }),
738
+ streamObjectSync: channel({
739
+ channelName: "streamObject.sync",
740
+ kind: "sync-stream"
741
+ }),
742
+ embed: channel({
685
743
  channelName: "embed",
686
744
  kind: "async"
687
- }
688
- ),
689
- embedMany: channel({
690
- channelName: "embedMany",
691
- kind: "async"
692
- }),
693
- rerank: channel({
694
- channelName: "rerank",
695
- kind: "async"
696
- }),
697
- agentGenerate: channel({
698
- channelName: "Agent.generate",
699
- kind: "async"
700
- }),
701
- agentStream: channel({
702
- channelName: "Agent.stream",
703
- kind: "async"
704
- }),
705
- agentStreamSync: channel({
706
- channelName: "Agent.stream.sync",
707
- kind: "sync-stream"
708
- }),
709
- toolLoopAgentGenerate: channel({
710
- channelName: "ToolLoopAgent.generate",
711
- kind: "async"
712
- }),
713
- toolLoopAgentStream: channel({
714
- channelName: "ToolLoopAgent.stream",
715
- kind: "async"
716
- }),
717
- workflowAgentStream: channel({
718
- channelName: "WorkflowAgent.stream",
719
- kind: "async"
720
- }),
721
- v7CreateTelemetryDispatcher: channel({
722
- channelName: "createTelemetryDispatcher",
723
- kind: "sync-stream"
724
- })
725
- });
726
- var harnessAgentChannels = defineChannels("@ai-sdk/harness", {
727
- generate: channel({
728
- channelName: "HarnessAgent.generate",
729
- kind: "async"
730
- }),
731
- stream: channel({
732
- channelName: "HarnessAgent.stream",
733
- kind: "async"
734
- }),
735
- continueGenerate: channel({
736
- channelName: "HarnessAgent.continueGenerate",
737
- kind: "async"
738
- }),
739
- continueStream: channel({
740
- channelName: "HarnessAgent.continueStream",
741
- kind: "async"
742
- })
743
- });
745
+ }),
746
+ embedMany: channel({
747
+ channelName: "embedMany",
748
+ kind: "async"
749
+ }),
750
+ rerank: channel({
751
+ channelName: "rerank",
752
+ kind: "async"
753
+ }),
754
+ agentGenerate: channel({
755
+ channelName: "Agent.generate",
756
+ kind: "async"
757
+ }),
758
+ agentStream: channel({
759
+ channelName: "Agent.stream",
760
+ kind: "async"
761
+ }),
762
+ agentStreamSync: channel({
763
+ channelName: "Agent.stream.sync",
764
+ kind: "sync-stream"
765
+ }),
766
+ toolLoopAgentGenerate: channel({
767
+ channelName: "ToolLoopAgent.generate",
768
+ kind: "async"
769
+ }),
770
+ toolLoopAgentStream: channel({
771
+ channelName: "ToolLoopAgent.stream",
772
+ kind: "async"
773
+ }),
774
+ workflowAgentStream: channel({
775
+ channelName: "WorkflowAgent.stream",
776
+ kind: "async"
777
+ }),
778
+ v7CreateTelemetryDispatcher: channel({
779
+ channelName: "createTelemetryDispatcher",
780
+ kind: "sync-stream"
781
+ })
782
+ },
783
+ { instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
784
+ );
785
+ var harnessAgentChannels = defineChannels(
786
+ "@ai-sdk/harness",
787
+ {
788
+ createSession: channel({
789
+ channelName: "HarnessAgent.createSession",
790
+ kind: "async"
791
+ }),
792
+ generate: channel({
793
+ channelName: "HarnessAgent.generate",
794
+ kind: "async"
795
+ }),
796
+ stream: channel({
797
+ channelName: "HarnessAgent.stream",
798
+ kind: "async"
799
+ }),
800
+ continueGenerate: channel({
801
+ channelName: "HarnessAgent.continueGenerate",
802
+ kind: "async"
803
+ }),
804
+ continueStream: channel({
805
+ channelName: "HarnessAgent.continueStream",
806
+ kind: "async"
807
+ })
808
+ },
809
+ { instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
810
+ );
744
811
 
745
812
  // src/auto-instrumentations/configs/ai-sdk.ts
746
813
  var aiSDKConfigs = [
@@ -748,6 +815,7 @@ var aiSDKConfigs = [
748
815
  // `./agent` entrypoint. The compiled class expression is anonymous, so match
749
816
  // the first async method with each public name instead of a class name.
750
817
  ...[
818
+ ["createSession", harnessAgentChannels.createSession.channelName],
751
819
  ["generate", harnessAgentChannels.generate.channelName],
752
820
  ["stream", harnessAgentChannels.stream.channelName],
753
821
  ["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
@@ -1143,7 +1211,8 @@ var claudeAgentSDKChannels = defineChannels(
1143
1211
  channelName: "query",
1144
1212
  kind: "sync-stream"
1145
1213
  })
1146
- }
1214
+ },
1215
+ { instrumentationName: INSTRUMENTATION_NAMES.CLAUDE_AGENT_SDK }
1147
1216
  );
1148
1217
 
1149
1218
  // src/auto-instrumentations/configs/claude-agent-sdk.ts
@@ -1178,24 +1247,28 @@ var claudeAgentSDKConfigs = [
1178
1247
  ];
1179
1248
 
1180
1249
  // src/instrumentation/plugins/cursor-sdk-channels.ts
1181
- var cursorSDKChannels = defineChannels("@cursor/sdk", {
1182
- create: channel({
1183
- channelName: "Agent.create",
1184
- kind: "async"
1185
- }),
1186
- resume: channel({
1187
- channelName: "Agent.resume",
1188
- kind: "async"
1189
- }),
1190
- prompt: channel({
1191
- channelName: "Agent.prompt",
1192
- kind: "async"
1193
- }),
1194
- send: channel({
1195
- channelName: "agent.send",
1196
- kind: "async"
1197
- })
1198
- });
1250
+ var cursorSDKChannels = defineChannels(
1251
+ "@cursor/sdk",
1252
+ {
1253
+ create: channel({
1254
+ channelName: "Agent.create",
1255
+ kind: "async"
1256
+ }),
1257
+ resume: channel({
1258
+ channelName: "Agent.resume",
1259
+ kind: "async"
1260
+ }),
1261
+ prompt: channel({
1262
+ channelName: "Agent.prompt",
1263
+ kind: "async"
1264
+ }),
1265
+ send: channel({
1266
+ channelName: "agent.send",
1267
+ kind: "async"
1268
+ })
1269
+ },
1270
+ { instrumentationName: INSTRUMENTATION_NAMES.CURSOR_SDK }
1271
+ );
1199
1272
 
1200
1273
  // src/auto-instrumentations/configs/cursor-sdk.ts
1201
1274
  var cursorSDKVersionRange = ">=1.0.7 <2.0.0";
@@ -1243,24 +1316,28 @@ var cursorSDKConfigs = cursorSDKEntrypoints.flatMap((filePath) => [
1243
1316
  ]);
1244
1317
 
1245
1318
  // src/instrumentation/plugins/openai-agents-channels.ts
1246
- var openAIAgentsCoreChannels = defineChannels("@openai/agents-core", {
1247
- onTraceStart: channel({
1248
- channelName: "tracing.processor.onTraceStart",
1249
- kind: "async"
1250
- }),
1251
- onTraceEnd: channel({
1252
- channelName: "tracing.processor.onTraceEnd",
1253
- kind: "async"
1254
- }),
1255
- onSpanStart: channel({
1256
- channelName: "tracing.processor.onSpanStart",
1257
- kind: "async"
1258
- }),
1259
- onSpanEnd: channel({
1260
- channelName: "tracing.processor.onSpanEnd",
1261
- kind: "async"
1262
- })
1263
- });
1319
+ var openAIAgentsCoreChannels = defineChannels(
1320
+ "@openai/agents-core",
1321
+ {
1322
+ onTraceStart: channel({
1323
+ channelName: "tracing.processor.onTraceStart",
1324
+ kind: "async"
1325
+ }),
1326
+ onTraceEnd: channel({
1327
+ channelName: "tracing.processor.onTraceEnd",
1328
+ kind: "async"
1329
+ }),
1330
+ onSpanStart: channel({
1331
+ channelName: "tracing.processor.onSpanStart",
1332
+ kind: "async"
1333
+ }),
1334
+ onSpanEnd: channel({
1335
+ channelName: "tracing.processor.onSpanEnd",
1336
+ kind: "async"
1337
+ })
1338
+ },
1339
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENAI_AGENTS }
1340
+ );
1264
1341
 
1265
1342
  // src/auto-instrumentations/configs/openai-agents.ts
1266
1343
  var lifecycleMethods = [
@@ -1288,24 +1365,28 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
1288
1365
  );
1289
1366
 
1290
1367
  // src/instrumentation/plugins/google-genai-channels.ts
1291
- var googleGenAIChannels = defineChannels("@google/genai", {
1292
- generateContent: channel({
1293
- channelName: "models.generateContent",
1294
- kind: "async"
1295
- }),
1296
- generateContentStream: channel({
1297
- channelName: "models.generateContentStream",
1298
- kind: "async"
1299
- }),
1300
- embedContent: channel({
1301
- channelName: "models.embedContent",
1302
- kind: "async"
1303
- }),
1304
- interactionsCreate: channel({
1305
- channelName: "interactions.create",
1306
- kind: "async"
1307
- })
1308
- });
1368
+ var googleGenAIChannels = defineChannels(
1369
+ "@google/genai",
1370
+ {
1371
+ generateContent: channel({
1372
+ channelName: "models.generateContent",
1373
+ kind: "async"
1374
+ }),
1375
+ generateContentStream: channel({
1376
+ channelName: "models.generateContentStream",
1377
+ kind: "async"
1378
+ }),
1379
+ embedContent: channel({
1380
+ channelName: "models.embedContent",
1381
+ kind: "async"
1382
+ }),
1383
+ interactionsCreate: channel({
1384
+ channelName: "interactions.create",
1385
+ kind: "async"
1386
+ })
1387
+ },
1388
+ { instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENAI }
1389
+ );
1309
1390
 
1310
1391
  // src/auto-instrumentations/configs/google-genai.ts
1311
1392
  var googleGenAIConfigs = [
@@ -1385,28 +1466,32 @@ var googleGenAIConfigs = [
1385
1466
  ];
1386
1467
 
1387
1468
  // src/instrumentation/plugins/huggingface-channels.ts
1388
- var huggingFaceChannels = defineChannels("@huggingface/inference", {
1389
- chatCompletion: channel({
1390
- channelName: "chatCompletion",
1391
- kind: "async"
1392
- }),
1393
- chatCompletionStream: channel({
1394
- channelName: "chatCompletionStream",
1395
- kind: "sync-stream"
1396
- }),
1397
- textGeneration: channel({
1398
- channelName: "textGeneration",
1399
- kind: "async"
1400
- }),
1401
- textGenerationStream: channel({
1402
- channelName: "textGenerationStream",
1403
- kind: "sync-stream"
1404
- }),
1405
- featureExtraction: channel({
1406
- channelName: "featureExtraction",
1407
- kind: "async"
1408
- })
1409
- });
1469
+ var huggingFaceChannels = defineChannels(
1470
+ "@huggingface/inference",
1471
+ {
1472
+ chatCompletion: channel({
1473
+ channelName: "chatCompletion",
1474
+ kind: "async"
1475
+ }),
1476
+ chatCompletionStream: channel({
1477
+ channelName: "chatCompletionStream",
1478
+ kind: "sync-stream"
1479
+ }),
1480
+ textGeneration: channel({
1481
+ channelName: "textGeneration",
1482
+ kind: "async"
1483
+ }),
1484
+ textGenerationStream: channel({
1485
+ channelName: "textGenerationStream",
1486
+ kind: "sync-stream"
1487
+ }),
1488
+ featureExtraction: channel({
1489
+ channelName: "featureExtraction",
1490
+ kind: "async"
1491
+ })
1492
+ },
1493
+ { instrumentationName: INSTRUMENTATION_NAMES.HUGGINGFACE }
1494
+ );
1410
1495
 
1411
1496
  // src/auto-instrumentations/configs/huggingface.ts
1412
1497
  var huggingFaceConfigs = [
@@ -1653,20 +1738,24 @@ var huggingFaceConfigs = [
1653
1738
  ];
1654
1739
 
1655
1740
  // src/instrumentation/plugins/openrouter-agent-channels.ts
1656
- var openRouterAgentChannels = defineChannels("@openrouter/agent", {
1657
- callModel: channel({
1658
- channelName: "callModel",
1659
- kind: "sync-stream"
1660
- }),
1661
- callModelTurn: channel({
1662
- channelName: "callModel.turn",
1663
- kind: "async"
1664
- }),
1665
- toolExecute: channel({
1666
- channelName: "tool.execute",
1667
- kind: "async"
1668
- })
1669
- });
1741
+ var openRouterAgentChannels = defineChannels(
1742
+ "@openrouter/agent",
1743
+ {
1744
+ callModel: channel({
1745
+ channelName: "callModel",
1746
+ kind: "sync-stream"
1747
+ }),
1748
+ callModelTurn: channel({
1749
+ channelName: "callModel.turn",
1750
+ kind: "async"
1751
+ }),
1752
+ toolExecute: channel({
1753
+ channelName: "tool.execute",
1754
+ kind: "async"
1755
+ })
1756
+ },
1757
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER_AGENT }
1758
+ );
1670
1759
 
1671
1760
  // src/auto-instrumentations/configs/openrouter-agent.ts
1672
1761
  var openRouterAgentConfigs = [
@@ -1685,38 +1774,40 @@ var openRouterAgentConfigs = [
1685
1774
  ];
1686
1775
 
1687
1776
  // src/instrumentation/plugins/openrouter-channels.ts
1688
- var openRouterChannels = defineChannels("@openrouter/sdk", {
1689
- chatSend: channel({
1690
- channelName: "chat.send",
1691
- kind: "async"
1692
- }),
1693
- embeddingsGenerate: channel({
1694
- channelName: "embeddings.generate",
1695
- kind: "async"
1696
- }),
1697
- rerankRerank: channel(
1698
- {
1777
+ var openRouterChannels = defineChannels(
1778
+ "@openrouter/sdk",
1779
+ {
1780
+ chatSend: channel({
1781
+ channelName: "chat.send",
1782
+ kind: "async"
1783
+ }),
1784
+ embeddingsGenerate: channel({
1785
+ channelName: "embeddings.generate",
1786
+ kind: "async"
1787
+ }),
1788
+ rerankRerank: channel({
1699
1789
  channelName: "rerank.rerank",
1700
1790
  kind: "async"
1701
- }
1702
- ),
1703
- betaResponsesSend: channel({
1704
- channelName: "beta.responses.send",
1705
- kind: "async"
1706
- }),
1707
- callModel: channel({
1708
- channelName: "callModel",
1709
- kind: "sync-stream"
1710
- }),
1711
- callModelTurn: channel({
1712
- channelName: "callModel.turn",
1713
- kind: "async"
1714
- }),
1715
- toolExecute: channel({
1716
- channelName: "tool.execute",
1717
- kind: "async"
1718
- })
1719
- });
1791
+ }),
1792
+ betaResponsesSend: channel({
1793
+ channelName: "beta.responses.send",
1794
+ kind: "async"
1795
+ }),
1796
+ callModel: channel({
1797
+ channelName: "callModel",
1798
+ kind: "sync-stream"
1799
+ }),
1800
+ callModelTurn: channel({
1801
+ channelName: "callModel.turn",
1802
+ kind: "async"
1803
+ }),
1804
+ toolExecute: channel({
1805
+ channelName: "tool.execute",
1806
+ kind: "async"
1807
+ })
1808
+ },
1809
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER }
1810
+ );
1720
1811
 
1721
1812
  // src/auto-instrumentations/configs/openrouter.ts
1722
1813
  var openRouterConfigs = [
@@ -1724,7 +1815,7 @@ var openRouterConfigs = [
1724
1815
  channelName: openRouterChannels.chatSend.channelName,
1725
1816
  module: {
1726
1817
  name: "@openrouter/sdk",
1727
- versionRange: ">=0.9.11 <1.0.0",
1818
+ versionRange: ">=0.9.11 <2.0.0",
1728
1819
  filePath: "esm/sdk/chat.js"
1729
1820
  },
1730
1821
  functionQuery: {
@@ -1737,7 +1828,7 @@ var openRouterConfigs = [
1737
1828
  channelName: openRouterChannels.embeddingsGenerate.channelName,
1738
1829
  module: {
1739
1830
  name: "@openrouter/sdk",
1740
- versionRange: ">=0.9.11 <1.0.0",
1831
+ versionRange: ">=0.9.11 <2.0.0",
1741
1832
  filePath: "esm/sdk/embeddings.js"
1742
1833
  },
1743
1834
  functionQuery: {
@@ -1750,7 +1841,7 @@ var openRouterConfigs = [
1750
1841
  channelName: openRouterChannels.rerankRerank.channelName,
1751
1842
  module: {
1752
1843
  name: "@openrouter/sdk",
1753
- versionRange: ">=0.12.0 <1.0.0",
1844
+ versionRange: ">=0.12.0 <2.0.0",
1754
1845
  filePath: "esm/sdk/rerank.js"
1755
1846
  },
1756
1847
  functionQuery: {
@@ -1763,7 +1854,7 @@ var openRouterConfigs = [
1763
1854
  channelName: openRouterChannels.betaResponsesSend.channelName,
1764
1855
  module: {
1765
1856
  name: "@openrouter/sdk",
1766
- versionRange: ">=0.9.11 <1.0.0",
1857
+ versionRange: ">=0.9.11 <2.0.0",
1767
1858
  filePath: "esm/sdk/responses.js"
1768
1859
  },
1769
1860
  functionQuery: {
@@ -1776,7 +1867,7 @@ var openRouterConfigs = [
1776
1867
  channelName: openRouterChannels.callModel.channelName,
1777
1868
  module: {
1778
1869
  name: "@openrouter/sdk",
1779
- versionRange: ">=0.9.11 <1.0.0",
1870
+ versionRange: ">=0.9.11 <2.0.0",
1780
1871
  filePath: "esm/sdk/sdk.js"
1781
1872
  },
1782
1873
  functionQuery: {
@@ -1788,52 +1879,56 @@ var openRouterConfigs = [
1788
1879
  ];
1789
1880
 
1790
1881
  // src/instrumentation/plugins/mistral-channels.ts
1791
- var mistralChannels = defineChannels("@mistralai/mistralai", {
1792
- chatComplete: channel({
1793
- channelName: "chat.complete",
1794
- kind: "async"
1795
- }),
1796
- chatStream: channel({
1797
- channelName: "chat.stream",
1798
- kind: "async"
1799
- }),
1800
- embeddingsCreate: channel({
1801
- channelName: "embeddings.create",
1802
- kind: "async"
1803
- }),
1804
- classifiersModerate: channel({
1805
- channelName: "classifiers.moderate",
1806
- kind: "async"
1807
- }),
1808
- classifiersModerateChat: channel({
1809
- channelName: "classifiers.moderateChat",
1810
- kind: "async"
1811
- }),
1812
- classifiersClassify: channel({
1813
- channelName: "classifiers.classify",
1814
- kind: "async"
1815
- }),
1816
- classifiersClassifyChat: channel({
1817
- channelName: "classifiers.classifyChat",
1818
- kind: "async"
1819
- }),
1820
- fimComplete: channel({
1821
- channelName: "fim.complete",
1822
- kind: "async"
1823
- }),
1824
- fimStream: channel({
1825
- channelName: "fim.stream",
1826
- kind: "async"
1827
- }),
1828
- agentsComplete: channel({
1829
- channelName: "agents.complete",
1830
- kind: "async"
1831
- }),
1832
- agentsStream: channel({
1833
- channelName: "agents.stream",
1834
- kind: "async"
1835
- })
1836
- });
1882
+ var mistralChannels = defineChannels(
1883
+ "@mistralai/mistralai",
1884
+ {
1885
+ chatComplete: channel({
1886
+ channelName: "chat.complete",
1887
+ kind: "async"
1888
+ }),
1889
+ chatStream: channel({
1890
+ channelName: "chat.stream",
1891
+ kind: "async"
1892
+ }),
1893
+ embeddingsCreate: channel({
1894
+ channelName: "embeddings.create",
1895
+ kind: "async"
1896
+ }),
1897
+ classifiersModerate: channel({
1898
+ channelName: "classifiers.moderate",
1899
+ kind: "async"
1900
+ }),
1901
+ classifiersModerateChat: channel({
1902
+ channelName: "classifiers.moderateChat",
1903
+ kind: "async"
1904
+ }),
1905
+ classifiersClassify: channel({
1906
+ channelName: "classifiers.classify",
1907
+ kind: "async"
1908
+ }),
1909
+ classifiersClassifyChat: channel({
1910
+ channelName: "classifiers.classifyChat",
1911
+ kind: "async"
1912
+ }),
1913
+ fimComplete: channel({
1914
+ channelName: "fim.complete",
1915
+ kind: "async"
1916
+ }),
1917
+ fimStream: channel({
1918
+ channelName: "fim.stream",
1919
+ kind: "async"
1920
+ }),
1921
+ agentsComplete: channel({
1922
+ channelName: "agents.complete",
1923
+ kind: "async"
1924
+ }),
1925
+ agentsStream: channel({
1926
+ channelName: "agents.stream",
1927
+ kind: "async"
1928
+ })
1929
+ },
1930
+ { instrumentationName: INSTRUMENTATION_NAMES.MISTRAL }
1931
+ );
1837
1932
 
1838
1933
  // src/auto-instrumentations/configs/mistral.ts
1839
1934
  var mistralConfigs = [
@@ -2126,20 +2221,24 @@ var mistralConfigs = [
2126
2221
  ];
2127
2222
 
2128
2223
  // src/instrumentation/plugins/google-adk-channels.ts
2129
- var googleADKChannels = defineChannels("@google/adk", {
2130
- runnerRunAsync: channel({
2131
- channelName: "runner.runAsync",
2132
- kind: "sync-stream"
2133
- }),
2134
- agentRunAsync: channel({
2135
- channelName: "agent.runAsync",
2136
- kind: "sync-stream"
2137
- }),
2138
- toolRunAsync: channel({
2139
- channelName: "tool.runAsync",
2140
- kind: "async"
2141
- })
2142
- });
2224
+ var googleADKChannels = defineChannels(
2225
+ "@google/adk",
2226
+ {
2227
+ runnerRunAsync: channel({
2228
+ channelName: "runner.runAsync",
2229
+ kind: "sync-stream"
2230
+ }),
2231
+ agentRunAsync: channel({
2232
+ channelName: "agent.runAsync",
2233
+ kind: "sync-stream"
2234
+ }),
2235
+ toolRunAsync: channel({
2236
+ channelName: "tool.runAsync",
2237
+ kind: "async"
2238
+ })
2239
+ },
2240
+ { instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_ADK }
2241
+ );
2143
2242
 
2144
2243
  // src/auto-instrumentations/configs/google-adk.ts
2145
2244
  var googleADKVersionRange = ">=0.1.0";
@@ -2370,24 +2469,28 @@ var googleADKConfigs = [
2370
2469
  ];
2371
2470
 
2372
2471
  // src/instrumentation/plugins/cohere-channels.ts
2373
- var cohereChannels = defineChannels("cohere-ai", {
2374
- chat: channel({
2375
- channelName: "chat",
2376
- kind: "async"
2377
- }),
2378
- chatStream: channel({
2379
- channelName: "chatStream",
2380
- kind: "async"
2381
- }),
2382
- embed: channel({
2383
- channelName: "embed",
2384
- kind: "async"
2385
- }),
2386
- rerank: channel({
2387
- channelName: "rerank",
2388
- kind: "async"
2389
- })
2390
- });
2472
+ var cohereChannels = defineChannels(
2473
+ "cohere-ai",
2474
+ {
2475
+ chat: channel({
2476
+ channelName: "chat",
2477
+ kind: "async"
2478
+ }),
2479
+ chatStream: channel({
2480
+ channelName: "chatStream",
2481
+ kind: "async"
2482
+ }),
2483
+ embed: channel({
2484
+ channelName: "embed",
2485
+ kind: "async"
2486
+ }),
2487
+ rerank: channel({
2488
+ channelName: "rerank",
2489
+ kind: "async"
2490
+ })
2491
+ },
2492
+ { instrumentationName: INSTRUMENTATION_NAMES.COHERE }
2493
+ );
2391
2494
 
2392
2495
  // src/auto-instrumentations/configs/cohere.ts
2393
2496
  var cohereConfigs = [
@@ -2654,18 +2757,20 @@ var cohereConfigs = [
2654
2757
  ];
2655
2758
 
2656
2759
  // src/instrumentation/plugins/groq-channels.ts
2657
- var groqChannels = defineChannels("groq-sdk", {
2658
- chatCompletionsCreate: channel({
2659
- channelName: "chat.completions.create",
2660
- kind: "async"
2661
- }),
2662
- embeddingsCreate: channel(
2663
- {
2760
+ var groqChannels = defineChannels(
2761
+ "groq-sdk",
2762
+ {
2763
+ chatCompletionsCreate: channel({
2764
+ channelName: "chat.completions.create",
2765
+ kind: "async"
2766
+ }),
2767
+ embeddingsCreate: channel({
2664
2768
  channelName: "embeddings.create",
2665
2769
  kind: "async"
2666
- }
2667
- )
2668
- });
2770
+ })
2771
+ },
2772
+ { instrumentationName: INSTRUMENTATION_NAMES.GROQ }
2773
+ );
2669
2774
 
2670
2775
  // src/auto-instrumentations/configs/groq.ts
2671
2776
  var groqConfigs = [
@@ -2698,38 +2803,46 @@ var groqConfigs = [
2698
2803
  ];
2699
2804
 
2700
2805
  // src/instrumentation/plugins/genkit-channels.ts
2701
- var genkitChannels = defineChannels("@genkit-ai/ai", {
2702
- generate: channel({
2703
- channelName: "generate",
2704
- kind: "async"
2705
- }),
2706
- generateStream: channel({
2707
- channelName: "generateStream",
2708
- kind: "sync-stream"
2709
- }),
2710
- embed: channel({
2711
- channelName: "embed",
2712
- kind: "async"
2713
- }),
2714
- embedMany: channel({
2715
- channelName: "embedMany",
2716
- kind: "async"
2717
- }),
2718
- actionRun: channel({
2719
- channelName: "action.run",
2720
- kind: "async"
2721
- }),
2722
- actionStream: channel({
2723
- channelName: "action.stream",
2724
- kind: "sync-stream"
2725
- })
2726
- });
2727
- var genkitCoreChannels = defineChannels("@genkit-ai/core", {
2728
- actionSpan: channel({
2729
- channelName: "action.span",
2730
- kind: "async"
2731
- })
2732
- });
2806
+ var genkitChannels = defineChannels(
2807
+ "@genkit-ai/ai",
2808
+ {
2809
+ generate: channel({
2810
+ channelName: "generate",
2811
+ kind: "async"
2812
+ }),
2813
+ generateStream: channel({
2814
+ channelName: "generateStream",
2815
+ kind: "sync-stream"
2816
+ }),
2817
+ embed: channel({
2818
+ channelName: "embed",
2819
+ kind: "async"
2820
+ }),
2821
+ embedMany: channel({
2822
+ channelName: "embedMany",
2823
+ kind: "async"
2824
+ }),
2825
+ actionRun: channel({
2826
+ channelName: "action.run",
2827
+ kind: "async"
2828
+ }),
2829
+ actionStream: channel({
2830
+ channelName: "action.stream",
2831
+ kind: "sync-stream"
2832
+ })
2833
+ },
2834
+ { instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
2835
+ );
2836
+ var genkitCoreChannels = defineChannels(
2837
+ "@genkit-ai/core",
2838
+ {
2839
+ actionSpan: channel({
2840
+ channelName: "action.span",
2841
+ kind: "async"
2842
+ })
2843
+ },
2844
+ { instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
2845
+ );
2733
2846
 
2734
2847
  // src/auto-instrumentations/configs/genkit.ts
2735
2848
  var genkitVersionRange = ">=1.0.0 <2.0.0";
@@ -2891,20 +3004,24 @@ var genkitConfigs = [
2891
3004
  ];
2892
3005
 
2893
3006
  // src/instrumentation/plugins/github-copilot-channels.ts
2894
- var gitHubCopilotChannels = defineChannels("@github/copilot-sdk", {
2895
- createSession: channel({
2896
- channelName: "client.createSession",
2897
- kind: "async"
2898
- }),
2899
- resumeSession: channel({
2900
- channelName: "client.resumeSession",
2901
- kind: "async"
2902
- }),
2903
- sendAndWait: channel({
2904
- channelName: "session.sendAndWait",
2905
- kind: "async"
2906
- })
2907
- });
3007
+ var gitHubCopilotChannels = defineChannels(
3008
+ "@github/copilot-sdk",
3009
+ {
3010
+ createSession: channel({
3011
+ channelName: "client.createSession",
3012
+ kind: "async"
3013
+ }),
3014
+ resumeSession: channel({
3015
+ channelName: "client.resumeSession",
3016
+ kind: "async"
3017
+ }),
3018
+ sendAndWait: channel({
3019
+ channelName: "session.sendAndWait",
3020
+ kind: "async"
3021
+ })
3022
+ },
3023
+ { instrumentationName: INSTRUMENTATION_NAMES.GITHUB_COPILOT }
3024
+ );
2908
3025
 
2909
3026
  // src/auto-instrumentations/configs/github-copilot.ts
2910
3027
  var gitHubCopilotConfigs = [
@@ -2995,16 +3112,20 @@ var gitHubCopilotConfigs = [
2995
3112
  ];
2996
3113
 
2997
3114
  // src/instrumentation/plugins/langchain-channels.ts
2998
- var langChainChannels = defineChannels("@langchain/core", {
2999
- configure: channel({
3000
- channelName: "CallbackManager.configure",
3001
- kind: "sync-stream"
3002
- }),
3003
- configureSync: channel({
3004
- channelName: "CallbackManager._configureSync",
3005
- kind: "sync-stream"
3006
- })
3007
- });
3115
+ var langChainChannels = defineChannels(
3116
+ "@langchain/core",
3117
+ {
3118
+ configure: channel({
3119
+ channelName: "CallbackManager.configure",
3120
+ kind: "sync-stream"
3121
+ }),
3122
+ configureSync: channel({
3123
+ channelName: "CallbackManager._configureSync",
3124
+ kind: "sync-stream"
3125
+ })
3126
+ },
3127
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGCHAIN }
3128
+ );
3008
3129
 
3009
3130
  // src/auto-instrumentations/configs/langchain.ts
3010
3131
  var langChainCoreVersionRange = ">=0.3.42";
@@ -3039,20 +3160,24 @@ var langchainConfigs = [
3039
3160
  ];
3040
3161
 
3041
3162
  // src/instrumentation/plugins/langsmith-channels.ts
3042
- var langSmithChannels = defineChannels("langsmith", {
3043
- createRun: channel({
3044
- channelName: "Client.createRun",
3045
- kind: "async"
3046
- }),
3047
- updateRun: channel({
3048
- channelName: "Client.updateRun",
3049
- kind: "async"
3050
- }),
3051
- batchIngestRuns: channel({
3052
- channelName: "Client.batchIngestRuns",
3053
- kind: "async"
3054
- })
3055
- });
3163
+ var langSmithChannels = defineChannels(
3164
+ "langsmith",
3165
+ {
3166
+ createRun: channel({
3167
+ channelName: "Client.createRun",
3168
+ kind: "async"
3169
+ }),
3170
+ updateRun: channel({
3171
+ channelName: "Client.updateRun",
3172
+ kind: "async"
3173
+ }),
3174
+ batchIngestRuns: channel({
3175
+ channelName: "Client.batchIngestRuns",
3176
+ kind: "async"
3177
+ })
3178
+ },
3179
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGSMITH }
3180
+ );
3056
3181
 
3057
3182
  // src/auto-instrumentations/configs/langsmith.ts
3058
3183
  var versionRange = ">=0.3.30 <1.0.0";
@@ -3096,11 +3221,12 @@ var piCodingAgentChannels = defineChannels(
3096
3221
  channelName: "AgentSession.prompt",
3097
3222
  kind: "async"
3098
3223
  })
3099
- }
3224
+ },
3225
+ { instrumentationName: INSTRUMENTATION_NAMES.PI_CODING_AGENT }
3100
3226
  );
3101
3227
 
3102
3228
  // src/auto-instrumentations/configs/pi-coding-agent.ts
3103
- var piCodingAgentVersionRange = ">=0.79.0 <0.80.0";
3229
+ var piCodingAgentVersionRange = ">=0.79.0 <0.82.0";
3104
3230
  var piCodingAgentConfigs = [
3105
3231
  {
3106
3232
  channelName: piCodingAgentChannels.prompt.channelName,