braintrust 3.31.0 → 3.33.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 (62) hide show
  1. package/README.md +0 -43
  2. package/dev/dist/index.d.mts +767 -0
  3. package/dev/dist/index.d.ts +767 -0
  4. package/dev/dist/index.js +3115 -908
  5. package/dev/dist/index.mjs +2466 -259
  6. package/dist/apply-auto-instrumentation.js +325 -221
  7. package/dist/apply-auto-instrumentation.mjs +110 -6
  8. package/dist/auto-instrumentations/bundler/esbuild.cjs +182 -7
  9. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  10. package/dist/auto-instrumentations/bundler/next.cjs +182 -7
  11. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  12. package/dist/auto-instrumentations/bundler/rollup.cjs +182 -7
  13. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  14. package/dist/auto-instrumentations/bundler/vite.cjs +182 -7
  15. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  16. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +182 -7
  17. package/dist/auto-instrumentations/bundler/webpack.cjs +182 -7
  18. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  19. package/dist/auto-instrumentations/{chunk-U64OYU4Q.mjs → chunk-T2DMPWFI.mjs} +113 -6
  20. package/dist/auto-instrumentations/{chunk-LW4HDHXT.mjs → chunk-UHJ2DNYJ.mjs} +74 -2
  21. package/dist/auto-instrumentations/{chunk-OXINGIEZ.mjs → chunk-W5QNG3PV.mjs} +1 -1
  22. package/dist/auto-instrumentations/hook.mjs +209 -9
  23. package/dist/auto-instrumentations/index.cjs +115 -6
  24. package/dist/auto-instrumentations/index.d.mts +5 -1
  25. package/dist/auto-instrumentations/index.d.ts +5 -1
  26. package/dist/auto-instrumentations/index.mjs +5 -1
  27. package/dist/browser.d.mts +2324 -342
  28. package/dist/browser.d.ts +2324 -342
  29. package/dist/browser.js +3573 -626
  30. package/dist/browser.mjs +3573 -626
  31. package/dist/chunk-7P6ASYW6.mjs +9 -0
  32. package/dist/{chunk-V32LW47Z.js → chunk-AXJTOUOC.js} +3022 -1131
  33. package/dist/{chunk-4AQGZS6X.js → chunk-G3VHOHRC.js} +85 -11
  34. package/dist/chunk-MLKGABMK.js +9 -0
  35. package/dist/{chunk-AJT4FR25.mjs → chunk-MZLBAFVJ.mjs} +2051 -160
  36. package/dist/{chunk-CE3BLB2L.mjs → chunk-TZVZN2JJ.mjs} +84 -10
  37. package/dist/cli.js +2614 -297
  38. package/dist/custom-views.d.mts +112 -0
  39. package/dist/custom-views.d.ts +112 -0
  40. package/dist/custom-views.js +13 -0
  41. package/dist/custom-views.mjs +13 -0
  42. package/dist/edge-light.d.mts +1 -1
  43. package/dist/edge-light.d.ts +1 -1
  44. package/dist/edge-light.js +3573 -626
  45. package/dist/edge-light.mjs +3573 -626
  46. package/dist/index.d.mts +2324 -342
  47. package/dist/index.d.ts +2324 -342
  48. package/dist/index.js +1959 -969
  49. package/dist/index.mjs +1450 -460
  50. package/dist/instrumentation/index.d.mts +439 -245
  51. package/dist/instrumentation/index.d.ts +439 -245
  52. package/dist/instrumentation/index.js +2550 -258
  53. package/dist/instrumentation/index.mjs +2550 -258
  54. package/dist/vitest-evals-reporter.js +17 -16
  55. package/dist/vitest-evals-reporter.mjs +3 -2
  56. package/dist/workerd.d.mts +1 -1
  57. package/dist/workerd.d.ts +1 -1
  58. package/dist/workerd.js +3573 -626
  59. package/dist/workerd.mjs +3573 -626
  60. package/package.json +10 -2
  61. package/util/dist/index.d.mts +326 -0
  62. package/util/dist/index.d.ts +326 -0
@@ -1188,6 +1188,8 @@ var envIntegrationAliases = {
1188
1188
  "openai-agents-core": "openAIAgents",
1189
1189
  openaiagentscore: "openAIAgents",
1190
1190
  google: "google",
1191
+ "google-generative-ai": "googleGenerativeAI",
1192
+ googlegenerativeai: "googleGenerativeAI",
1191
1193
  "google-genai": "googleGenAI",
1192
1194
  googlegenai: "googleGenAI",
1193
1195
  huggingface: "huggingface",
@@ -1218,10 +1220,15 @@ var envIntegrationAliases = {
1218
1220
  "langchain-js": "langchain",
1219
1221
  "@langchain": "langchain",
1220
1222
  langgraph: "langgraph",
1223
+ langgraphsdk: "langgraphSDK",
1224
+ "langgraph-sdk": "langgraphSDK",
1225
+ "@langchain/langgraph-sdk": "langgraphSDK",
1221
1226
  langsmith: "langsmith",
1222
1227
  voyage: "voyageai",
1223
1228
  "voyage-ai": "voyageai",
1224
- voyageai: "voyageai"
1229
+ voyageai: "voyageai",
1230
+ elevenlabs: "elevenlabs",
1231
+ "@elevenlabs/elevenlabs-js": "elevenlabs"
1225
1232
  };
1226
1233
  function readDisabledInstrumentationEnvConfig(disabledList) {
1227
1234
  const integrations = {};
@@ -1357,6 +1364,7 @@ var INSTRUMENTATION_NAMES = {
1357
1364
  GENKIT: "genkit",
1358
1365
  GITHUB_COPILOT: "github-copilot",
1359
1366
  GOOGLE_ADK: "google-adk",
1367
+ GOOGLE_GENERATIVE_AI: "google-generative-ai",
1360
1368
  GOOGLE_GENAI: "google-genai",
1361
1369
  GROQ: "groq",
1362
1370
  HUGGINGFACE: "huggingface",
@@ -1364,6 +1372,7 @@ var INSTRUMENTATION_NAMES = {
1364
1372
  LANGSMITH: "langsmith",
1365
1373
  MASTRA: "mastra",
1366
1374
  MISTRAL: "mistral",
1375
+ LANGGRAPH_SDK: "langgraph-sdk",
1367
1376
  OLLAMA: "ollama",
1368
1377
  OPENAI: "openai",
1369
1378
  OPENAI_AGENTS: "openai-agents",
@@ -1372,7 +1381,8 @@ var INSTRUMENTATION_NAMES = {
1372
1381
  OPENROUTER_AGENT: "openrouter-agent",
1373
1382
  PI_CODING_AGENT: "pi-coding-agent",
1374
1383
  STRANDS_AGENT_SDK: "strands-agent-sdk",
1375
- VOYAGEAI: "voyageai"
1384
+ VOYAGEAI: "voyageai",
1385
+ ELEVENLABS: "elevenlabs"
1376
1386
  };
1377
1387
 
1378
1388
  // src/instrumentation/plugins/ai-sdk-channels.ts
@@ -1480,8 +1490,8 @@ var harnessAgentChannels = defineChannels(
1480
1490
  // src/auto-instrumentations/configs/ai-sdk.ts
1481
1491
  var aiSDKConfigs = [
1482
1492
  // HarnessAgent turn methods are published only from the package's ESM
1483
- // `./agent` entrypoint. The compiled class expression is anonymous, so match
1484
- // the first async method with each public name instead of a class name.
1493
+ // `./agent` entrypoint. Target the class binding so similarly named getters
1494
+ // on stream result classes are not mistaken for agent turn methods.
1485
1495
  ...[
1486
1496
  ["createSession", harnessAgentChannels.createSession.channelName],
1487
1497
  ["generate", harnessAgentChannels.generate.channelName],
@@ -1496,6 +1506,7 @@ var aiSDKConfigs = [
1496
1506
  filePath: "dist/agent/index.js"
1497
1507
  },
1498
1508
  functionQuery: {
1509
+ className: "HarnessAgent",
1499
1510
  methodName,
1500
1511
  kind: "Async",
1501
1512
  index: 0
@@ -1929,9 +1940,9 @@ var anthropicChannels = defineChannels(
1929
1940
  // src/auto-instrumentations/configs/anthropic.ts
1930
1941
  var anthropicConfigs = [
1931
1942
  // Each logical target is listed for both published module formats:
1932
- // `.mjs` covers ESM imports, while `.js` covers CJS requires. The Bedrock
1933
- // SDK delegates CJS `messages.create` calls through these Anthropic SDK
1934
- // `.js` resource files.
1943
+ // `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
1944
+ // @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
1945
+ // shared Anthropic resources, so they use the same targets and channels.
1935
1946
  // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
1936
1947
  {
1937
1948
  channelName: anthropicChannels.messagesCreate.channelName,
@@ -3242,6 +3253,40 @@ var googleADKConfigs = [
3242
3253
  }
3243
3254
  ];
3244
3255
 
3256
+ // src/instrumentation/plugins/google-generative-ai-channels.ts
3257
+ var googleGenerativeAIChannels = defineChannels(
3258
+ "@google/generative-ai",
3259
+ {
3260
+ generateContent: channel({ channelName: "GenerativeModel.generateContent", kind: "async" }),
3261
+ generateContentStream: channel({ channelName: "GenerativeModel.generateContentStream", kind: "async" }),
3262
+ embedContent: channel({ channelName: "GenerativeModel.embedContent", kind: "async" }),
3263
+ batchEmbedContents: channel({ channelName: "GenerativeModel.batchEmbedContents", kind: "async" }),
3264
+ sendMessage: channel({ channelName: "ChatSession.sendMessage", kind: "async" }),
3265
+ sendMessageStream: channel({ channelName: "ChatSession.sendMessageStream", kind: "async" })
3266
+ },
3267
+ { instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENERATIVE_AI }
3268
+ );
3269
+
3270
+ // src/auto-instrumentations/configs/google-generative-ai.ts
3271
+ var googleGenerativeAIConfigs = [
3272
+ "dist/index.js",
3273
+ "dist/index.mjs"
3274
+ ].flatMap(
3275
+ (filePath) => Object.entries(googleGenerativeAIChannels).map(([methodName, channel2]) => ({
3276
+ channelName: channel2.channelName,
3277
+ module: {
3278
+ name: "@google/generative-ai",
3279
+ versionRange: ">=0.24.0 <0.25.0",
3280
+ filePath
3281
+ },
3282
+ functionQuery: {
3283
+ className: methodName.startsWith("sendMessage") ? "ChatSession" : "GenerativeModel",
3284
+ methodName,
3285
+ kind: "Async"
3286
+ }
3287
+ }))
3288
+ );
3289
+
3245
3290
  // src/instrumentation/plugins/google-genai-channels.ts
3246
3291
  var googleGenAIChannels = defineChannels(
3247
3292
  "@google/genai",
@@ -3258,6 +3303,10 @@ var googleGenAIChannels = defineChannels(
3258
3303
  channelName: "models.embedContent",
3259
3304
  kind: "async"
3260
3305
  }),
3306
+ httpResponseJson: channel({
3307
+ channelName: "httpResponse.json",
3308
+ kind: "async"
3309
+ }),
3261
3310
  interactionsCreate: channel({
3262
3311
  channelName: "interactions.create",
3263
3312
  kind: "async"
@@ -3327,6 +3376,21 @@ var googleGenAIConfigs = [
3327
3376
  kind: "Async"
3328
3377
  }
3329
3378
  },
3379
+ // The SDK's embedding response converter drops usageMetadata. Observe the
3380
+ // parsed HTTP response before conversion; the plugin scopes this to embeddings.
3381
+ {
3382
+ channelName: googleGenAIChannels.httpResponseJson.channelName,
3383
+ module: {
3384
+ name: "@google/genai",
3385
+ versionRange: ">=1.0.0",
3386
+ filePath: "dist/node/index.mjs"
3387
+ },
3388
+ functionQuery: {
3389
+ className: "HttpResponse",
3390
+ methodName: "json",
3391
+ kind: "Async"
3392
+ }
3393
+ },
3330
3394
  // BaseInteractions.create - Interactions API entry point
3331
3395
  {
3332
3396
  channelName: googleGenAIChannels.interactionsCreate.channelName,
@@ -4182,6 +4246,42 @@ var mistralConfigs = [
4182
4246
  }
4183
4247
  ];
4184
4248
 
4249
+ // src/instrumentation/plugins/langgraph-sdk-channels.ts
4250
+ var langGraphSDKChannels = defineChannels(
4251
+ "@langchain/langgraph-sdk",
4252
+ {
4253
+ wait: channel({
4254
+ channelName: "runs.wait",
4255
+ kind: "async"
4256
+ }),
4257
+ stream: channel({
4258
+ channelName: "runs.stream",
4259
+ kind: "sync-stream"
4260
+ })
4261
+ },
4262
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
4263
+ );
4264
+
4265
+ // src/auto-instrumentations/configs/langgraph-sdk.ts
4266
+ var langGraphSDKConfigs = [
4267
+ "js",
4268
+ "cjs"
4269
+ ].flatMap(
4270
+ (extension) => ["wait", "stream"].map((methodName) => ({
4271
+ channelName: langGraphSDKChannels[methodName].channelName,
4272
+ module: {
4273
+ name: "@langchain/langgraph-sdk",
4274
+ versionRange: ">=1.9.25 <2.0.0",
4275
+ filePath: `dist/client/runs/index.${extension}`
4276
+ },
4277
+ functionQuery: {
4278
+ className: "RunsClient",
4279
+ methodName,
4280
+ kind: methodName === "stream" ? "Sync" : "Async"
4281
+ }
4282
+ }))
4283
+ );
4284
+
4185
4285
  // src/instrumentation/plugins/ollama-channels.ts
4186
4286
  var ollamaChannels = defineChannels(
4187
4287
  "ollama",
@@ -4280,6 +4380,18 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
4280
4380
  var openAIChannels = defineChannels(
4281
4381
  "openai",
4282
4382
  {
4383
+ agentsTraceStart: channel({
4384
+ channelName: "agents.trace.start",
4385
+ kind: "async"
4386
+ }),
4387
+ agentsTraceCapture: channel({
4388
+ channelName: "agents.trace.capture",
4389
+ kind: "async"
4390
+ }),
4391
+ agentsTraceFail: channel({
4392
+ channelName: "agents.trace.fail",
4393
+ kind: "async"
4394
+ }),
4283
4395
  filesCreateTraced: channel({
4284
4396
  channelName: "files.create-traced",
4285
4397
  kind: "async"
@@ -4806,6 +4918,60 @@ var strandsAgentSDKConfigs = [
4806
4918
  }
4807
4919
  ];
4808
4920
 
4921
+ // src/instrumentation/plugins/elevenlabs-channels.ts
4922
+ var elevenLabsChannels = defineChannels(
4923
+ "@elevenlabs/elevenlabs-js",
4924
+ {
4925
+ convert: channel({
4926
+ channelName: "textToSpeech.convert",
4927
+ kind: "async"
4928
+ }),
4929
+ stream: channel({
4930
+ channelName: "textToSpeech.stream",
4931
+ kind: "async"
4932
+ }),
4933
+ convertWithTimestamps: channel({ channelName: "textToSpeech.convertWithTimestamps", kind: "async" }),
4934
+ streamWithTimestamps: channel({ channelName: "textToSpeech.streamWithTimestamps", kind: "async" }),
4935
+ transcribe: channel({ channelName: "speechToText.convert", kind: "async" })
4936
+ },
4937
+ { instrumentationName: INSTRUMENTATION_NAMES.ELEVENLABS }
4938
+ );
4939
+
4940
+ // src/auto-instrumentations/configs/elevenlabs.ts
4941
+ var elevenLabsConfigs = [
4942
+ ...[
4943
+ "convert",
4944
+ "stream",
4945
+ "convertWithTimestamps",
4946
+ "streamWithTimestamps"
4947
+ ].map((methodName) => ({
4948
+ channelName: elevenLabsChannels[methodName].channelName,
4949
+ module: {
4950
+ name: "@elevenlabs/elevenlabs-js",
4951
+ versionRange: ">=2.67.0 <3.0.0",
4952
+ filePath: "api/resources/textToSpeech/client/Client.js"
4953
+ },
4954
+ functionQuery: {
4955
+ className: "TextToSpeechClient",
4956
+ methodName,
4957
+ kind: "Async"
4958
+ }
4959
+ })),
4960
+ {
4961
+ channelName: elevenLabsChannels.transcribe.channelName,
4962
+ module: {
4963
+ name: "@elevenlabs/elevenlabs-js",
4964
+ versionRange: ">=2.67.0 <3.0.0",
4965
+ filePath: "api/resources/speechToText/client/Client.js"
4966
+ },
4967
+ functionQuery: {
4968
+ className: "SpeechToTextClient",
4969
+ methodName: "convert",
4970
+ kind: "Async"
4971
+ }
4972
+ }
4973
+ ];
4974
+
4809
4975
  // src/instrumentation/plugins/voyageai-channels.ts
4810
4976
  var voyageAIChannels = defineChannels(
4811
4977
  "voyageai",
@@ -4914,6 +5080,10 @@ var defaultInstrumentationConfigGroups = [
4914
5080
  integrations: ["openAIAgents"],
4915
5081
  configs: openAIAgentsCoreConfigs
4916
5082
  },
5083
+ {
5084
+ integrations: ["googleGenerativeAI"],
5085
+ configs: googleGenerativeAIConfigs
5086
+ },
4917
5087
  {
4918
5088
  integrations: ["google", "googleGenAI"],
4919
5089
  configs: googleGenAIConfigs
@@ -4933,6 +5103,7 @@ var defaultInstrumentationConfigGroups = [
4933
5103
  configs: openRouterAgentConfigs
4934
5104
  },
4935
5105
  { integrations: ["mistral"], configs: mistralConfigs },
5106
+ { integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
4936
5107
  { integrations: ["ollama"], configs: ollamaConfigs },
4937
5108
  { integrations: ["googleADK"], configs: googleADKConfigs },
4938
5109
  { integrations: ["cohere"], configs: cohereConfigs },
@@ -4957,6 +5128,10 @@ var defaultInstrumentationConfigGroups = [
4957
5128
  integrations: ["flue"],
4958
5129
  configs: flueConfigs
4959
5130
  },
5131
+ {
5132
+ integrations: ["elevenlabs"],
5133
+ configs: elevenLabsConfigs
5134
+ },
4960
5135
  {
4961
5136
  integrations: ["voyageai"],
4962
5137
  configs: voyageAIConfigs
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  unplugin
3
- } from "../chunk-LW4HDHXT.mjs";
4
- import "../chunk-U64OYU4Q.mjs";
3
+ } from "../chunk-UHJ2DNYJ.mjs";
4
+ import "../chunk-T2DMPWFI.mjs";
5
5
  import "../chunk-I55G56ZL.mjs";
6
6
  import "../chunk-JPUFNW7X.mjs";
7
7
  import "../chunk-P5YLNB2A.mjs";
@@ -1171,6 +1171,8 @@ var envIntegrationAliases = {
1171
1171
  "openai-agents-core": "openAIAgents",
1172
1172
  openaiagentscore: "openAIAgents",
1173
1173
  google: "google",
1174
+ "google-generative-ai": "googleGenerativeAI",
1175
+ googlegenerativeai: "googleGenerativeAI",
1174
1176
  "google-genai": "googleGenAI",
1175
1177
  googlegenai: "googleGenAI",
1176
1178
  huggingface: "huggingface",
@@ -1201,10 +1203,15 @@ var envIntegrationAliases = {
1201
1203
  "langchain-js": "langchain",
1202
1204
  "@langchain": "langchain",
1203
1205
  langgraph: "langgraph",
1206
+ langgraphsdk: "langgraphSDK",
1207
+ "langgraph-sdk": "langgraphSDK",
1208
+ "@langchain/langgraph-sdk": "langgraphSDK",
1204
1209
  langsmith: "langsmith",
1205
1210
  voyage: "voyageai",
1206
1211
  "voyage-ai": "voyageai",
1207
- voyageai: "voyageai"
1212
+ voyageai: "voyageai",
1213
+ elevenlabs: "elevenlabs",
1214
+ "@elevenlabs/elevenlabs-js": "elevenlabs"
1208
1215
  };
1209
1216
  function readDisabledInstrumentationEnvConfig(disabledList) {
1210
1217
  const integrations = {};
@@ -1340,6 +1347,7 @@ var INSTRUMENTATION_NAMES = {
1340
1347
  GENKIT: "genkit",
1341
1348
  GITHUB_COPILOT: "github-copilot",
1342
1349
  GOOGLE_ADK: "google-adk",
1350
+ GOOGLE_GENERATIVE_AI: "google-generative-ai",
1343
1351
  GOOGLE_GENAI: "google-genai",
1344
1352
  GROQ: "groq",
1345
1353
  HUGGINGFACE: "huggingface",
@@ -1347,6 +1355,7 @@ var INSTRUMENTATION_NAMES = {
1347
1355
  LANGSMITH: "langsmith",
1348
1356
  MASTRA: "mastra",
1349
1357
  MISTRAL: "mistral",
1358
+ LANGGRAPH_SDK: "langgraph-sdk",
1350
1359
  OLLAMA: "ollama",
1351
1360
  OPENAI: "openai",
1352
1361
  OPENAI_AGENTS: "openai-agents",
@@ -1355,7 +1364,8 @@ var INSTRUMENTATION_NAMES = {
1355
1364
  OPENROUTER_AGENT: "openrouter-agent",
1356
1365
  PI_CODING_AGENT: "pi-coding-agent",
1357
1366
  STRANDS_AGENT_SDK: "strands-agent-sdk",
1358
- VOYAGEAI: "voyageai"
1367
+ VOYAGEAI: "voyageai",
1368
+ ELEVENLABS: "elevenlabs"
1359
1369
  };
1360
1370
 
1361
1371
  // src/instrumentation/plugins/ai-sdk-channels.ts
@@ -1463,8 +1473,8 @@ var harnessAgentChannels = defineChannels(
1463
1473
  // src/auto-instrumentations/configs/ai-sdk.ts
1464
1474
  var aiSDKConfigs = [
1465
1475
  // HarnessAgent turn methods are published only from the package's ESM
1466
- // `./agent` entrypoint. The compiled class expression is anonymous, so match
1467
- // the first async method with each public name instead of a class name.
1476
+ // `./agent` entrypoint. Target the class binding so similarly named getters
1477
+ // on stream result classes are not mistaken for agent turn methods.
1468
1478
  ...[
1469
1479
  ["createSession", harnessAgentChannels.createSession.channelName],
1470
1480
  ["generate", harnessAgentChannels.generate.channelName],
@@ -1479,6 +1489,7 @@ var aiSDKConfigs = [
1479
1489
  filePath: "dist/agent/index.js"
1480
1490
  },
1481
1491
  functionQuery: {
1492
+ className: "HarnessAgent",
1482
1493
  methodName,
1483
1494
  kind: "Async",
1484
1495
  index: 0
@@ -1912,9 +1923,9 @@ var anthropicChannels = defineChannels(
1912
1923
  // src/auto-instrumentations/configs/anthropic.ts
1913
1924
  var anthropicConfigs = [
1914
1925
  // Each logical target is listed for both published module formats:
1915
- // `.mjs` covers ESM imports, while `.js` covers CJS requires. The Bedrock
1916
- // SDK delegates CJS `messages.create` calls through these Anthropic SDK
1917
- // `.js` resource files.
1926
+ // `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
1927
+ // @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
1928
+ // shared Anthropic resources, so they use the same targets and channels.
1918
1929
  // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
1919
1930
  {
1920
1931
  channelName: anthropicChannels.messagesCreate.channelName,
@@ -3225,6 +3236,40 @@ var googleADKConfigs = [
3225
3236
  }
3226
3237
  ];
3227
3238
 
3239
+ // src/instrumentation/plugins/google-generative-ai-channels.ts
3240
+ var googleGenerativeAIChannels = defineChannels(
3241
+ "@google/generative-ai",
3242
+ {
3243
+ generateContent: channel({ channelName: "GenerativeModel.generateContent", kind: "async" }),
3244
+ generateContentStream: channel({ channelName: "GenerativeModel.generateContentStream", kind: "async" }),
3245
+ embedContent: channel({ channelName: "GenerativeModel.embedContent", kind: "async" }),
3246
+ batchEmbedContents: channel({ channelName: "GenerativeModel.batchEmbedContents", kind: "async" }),
3247
+ sendMessage: channel({ channelName: "ChatSession.sendMessage", kind: "async" }),
3248
+ sendMessageStream: channel({ channelName: "ChatSession.sendMessageStream", kind: "async" })
3249
+ },
3250
+ { instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENERATIVE_AI }
3251
+ );
3252
+
3253
+ // src/auto-instrumentations/configs/google-generative-ai.ts
3254
+ var googleGenerativeAIConfigs = [
3255
+ "dist/index.js",
3256
+ "dist/index.mjs"
3257
+ ].flatMap(
3258
+ (filePath) => Object.entries(googleGenerativeAIChannels).map(([methodName, channel2]) => ({
3259
+ channelName: channel2.channelName,
3260
+ module: {
3261
+ name: "@google/generative-ai",
3262
+ versionRange: ">=0.24.0 <0.25.0",
3263
+ filePath
3264
+ },
3265
+ functionQuery: {
3266
+ className: methodName.startsWith("sendMessage") ? "ChatSession" : "GenerativeModel",
3267
+ methodName,
3268
+ kind: "Async"
3269
+ }
3270
+ }))
3271
+ );
3272
+
3228
3273
  // src/instrumentation/plugins/google-genai-channels.ts
3229
3274
  var googleGenAIChannels = defineChannels(
3230
3275
  "@google/genai",
@@ -3241,6 +3286,10 @@ var googleGenAIChannels = defineChannels(
3241
3286
  channelName: "models.embedContent",
3242
3287
  kind: "async"
3243
3288
  }),
3289
+ httpResponseJson: channel({
3290
+ channelName: "httpResponse.json",
3291
+ kind: "async"
3292
+ }),
3244
3293
  interactionsCreate: channel({
3245
3294
  channelName: "interactions.create",
3246
3295
  kind: "async"
@@ -3310,6 +3359,21 @@ var googleGenAIConfigs = [
3310
3359
  kind: "Async"
3311
3360
  }
3312
3361
  },
3362
+ // The SDK's embedding response converter drops usageMetadata. Observe the
3363
+ // parsed HTTP response before conversion; the plugin scopes this to embeddings.
3364
+ {
3365
+ channelName: googleGenAIChannels.httpResponseJson.channelName,
3366
+ module: {
3367
+ name: "@google/genai",
3368
+ versionRange: ">=1.0.0",
3369
+ filePath: "dist/node/index.mjs"
3370
+ },
3371
+ functionQuery: {
3372
+ className: "HttpResponse",
3373
+ methodName: "json",
3374
+ kind: "Async"
3375
+ }
3376
+ },
3313
3377
  // BaseInteractions.create - Interactions API entry point
3314
3378
  {
3315
3379
  channelName: googleGenAIChannels.interactionsCreate.channelName,
@@ -4165,6 +4229,42 @@ var mistralConfigs = [
4165
4229
  }
4166
4230
  ];
4167
4231
 
4232
+ // src/instrumentation/plugins/langgraph-sdk-channels.ts
4233
+ var langGraphSDKChannels = defineChannels(
4234
+ "@langchain/langgraph-sdk",
4235
+ {
4236
+ wait: channel({
4237
+ channelName: "runs.wait",
4238
+ kind: "async"
4239
+ }),
4240
+ stream: channel({
4241
+ channelName: "runs.stream",
4242
+ kind: "sync-stream"
4243
+ })
4244
+ },
4245
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
4246
+ );
4247
+
4248
+ // src/auto-instrumentations/configs/langgraph-sdk.ts
4249
+ var langGraphSDKConfigs = [
4250
+ "js",
4251
+ "cjs"
4252
+ ].flatMap(
4253
+ (extension) => ["wait", "stream"].map((methodName) => ({
4254
+ channelName: langGraphSDKChannels[methodName].channelName,
4255
+ module: {
4256
+ name: "@langchain/langgraph-sdk",
4257
+ versionRange: ">=1.9.25 <2.0.0",
4258
+ filePath: `dist/client/runs/index.${extension}`
4259
+ },
4260
+ functionQuery: {
4261
+ className: "RunsClient",
4262
+ methodName,
4263
+ kind: methodName === "stream" ? "Sync" : "Async"
4264
+ }
4265
+ }))
4266
+ );
4267
+
4168
4268
  // src/instrumentation/plugins/ollama-channels.ts
4169
4269
  var ollamaChannels = defineChannels(
4170
4270
  "ollama",
@@ -4263,6 +4363,18 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
4263
4363
  var openAIChannels = defineChannels(
4264
4364
  "openai",
4265
4365
  {
4366
+ agentsTraceStart: channel({
4367
+ channelName: "agents.trace.start",
4368
+ kind: "async"
4369
+ }),
4370
+ agentsTraceCapture: channel({
4371
+ channelName: "agents.trace.capture",
4372
+ kind: "async"
4373
+ }),
4374
+ agentsTraceFail: channel({
4375
+ channelName: "agents.trace.fail",
4376
+ kind: "async"
4377
+ }),
4266
4378
  filesCreateTraced: channel({
4267
4379
  channelName: "files.create-traced",
4268
4380
  kind: "async"
@@ -4789,6 +4901,60 @@ var strandsAgentSDKConfigs = [
4789
4901
  }
4790
4902
  ];
4791
4903
 
4904
+ // src/instrumentation/plugins/elevenlabs-channels.ts
4905
+ var elevenLabsChannels = defineChannels(
4906
+ "@elevenlabs/elevenlabs-js",
4907
+ {
4908
+ convert: channel({
4909
+ channelName: "textToSpeech.convert",
4910
+ kind: "async"
4911
+ }),
4912
+ stream: channel({
4913
+ channelName: "textToSpeech.stream",
4914
+ kind: "async"
4915
+ }),
4916
+ convertWithTimestamps: channel({ channelName: "textToSpeech.convertWithTimestamps", kind: "async" }),
4917
+ streamWithTimestamps: channel({ channelName: "textToSpeech.streamWithTimestamps", kind: "async" }),
4918
+ transcribe: channel({ channelName: "speechToText.convert", kind: "async" })
4919
+ },
4920
+ { instrumentationName: INSTRUMENTATION_NAMES.ELEVENLABS }
4921
+ );
4922
+
4923
+ // src/auto-instrumentations/configs/elevenlabs.ts
4924
+ var elevenLabsConfigs = [
4925
+ ...[
4926
+ "convert",
4927
+ "stream",
4928
+ "convertWithTimestamps",
4929
+ "streamWithTimestamps"
4930
+ ].map((methodName) => ({
4931
+ channelName: elevenLabsChannels[methodName].channelName,
4932
+ module: {
4933
+ name: "@elevenlabs/elevenlabs-js",
4934
+ versionRange: ">=2.67.0 <3.0.0",
4935
+ filePath: "api/resources/textToSpeech/client/Client.js"
4936
+ },
4937
+ functionQuery: {
4938
+ className: "TextToSpeechClient",
4939
+ methodName,
4940
+ kind: "Async"
4941
+ }
4942
+ })),
4943
+ {
4944
+ channelName: elevenLabsChannels.transcribe.channelName,
4945
+ module: {
4946
+ name: "@elevenlabs/elevenlabs-js",
4947
+ versionRange: ">=2.67.0 <3.0.0",
4948
+ filePath: "api/resources/speechToText/client/Client.js"
4949
+ },
4950
+ functionQuery: {
4951
+ className: "SpeechToTextClient",
4952
+ methodName: "convert",
4953
+ kind: "Async"
4954
+ }
4955
+ }
4956
+ ];
4957
+
4792
4958
  // src/instrumentation/plugins/voyageai-channels.ts
4793
4959
  var voyageAIChannels = defineChannels(
4794
4960
  "voyageai",
@@ -4897,6 +5063,10 @@ var defaultInstrumentationConfigGroups = [
4897
5063
  integrations: ["openAIAgents"],
4898
5064
  configs: openAIAgentsCoreConfigs
4899
5065
  },
5066
+ {
5067
+ integrations: ["googleGenerativeAI"],
5068
+ configs: googleGenerativeAIConfigs
5069
+ },
4900
5070
  {
4901
5071
  integrations: ["google", "googleGenAI"],
4902
5072
  configs: googleGenAIConfigs
@@ -4916,6 +5086,7 @@ var defaultInstrumentationConfigGroups = [
4916
5086
  configs: openRouterAgentConfigs
4917
5087
  },
4918
5088
  { integrations: ["mistral"], configs: mistralConfigs },
5089
+ { integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
4919
5090
  { integrations: ["ollama"], configs: ollamaConfigs },
4920
5091
  { integrations: ["googleADK"], configs: googleADKConfigs },
4921
5092
  { integrations: ["cohere"], configs: cohereConfigs },
@@ -4940,6 +5111,10 @@ var defaultInstrumentationConfigGroups = [
4940
5111
  integrations: ["flue"],
4941
5112
  configs: flueConfigs
4942
5113
  },
5114
+ {
5115
+ integrations: ["elevenlabs"],
5116
+ configs: elevenLabsConfigs
5117
+ },
4943
5118
  {
4944
5119
  integrations: ["voyageai"],
4945
5120
  configs: voyageAIConfigs