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
@@ -1189,6 +1189,8 @@ var envIntegrationAliases = {
1189
1189
  "openai-agents-core": "openAIAgents",
1190
1190
  openaiagentscore: "openAIAgents",
1191
1191
  google: "google",
1192
+ "google-generative-ai": "googleGenerativeAI",
1193
+ googlegenerativeai: "googleGenerativeAI",
1192
1194
  "google-genai": "googleGenAI",
1193
1195
  googlegenai: "googleGenAI",
1194
1196
  huggingface: "huggingface",
@@ -1219,10 +1221,15 @@ var envIntegrationAliases = {
1219
1221
  "langchain-js": "langchain",
1220
1222
  "@langchain": "langchain",
1221
1223
  langgraph: "langgraph",
1224
+ langgraphsdk: "langgraphSDK",
1225
+ "langgraph-sdk": "langgraphSDK",
1226
+ "@langchain/langgraph-sdk": "langgraphSDK",
1222
1227
  langsmith: "langsmith",
1223
1228
  voyage: "voyageai",
1224
1229
  "voyage-ai": "voyageai",
1225
- voyageai: "voyageai"
1230
+ voyageai: "voyageai",
1231
+ elevenlabs: "elevenlabs",
1232
+ "@elevenlabs/elevenlabs-js": "elevenlabs"
1226
1233
  };
1227
1234
  function readDisabledInstrumentationEnvConfig(disabledList) {
1228
1235
  const integrations = {};
@@ -1358,6 +1365,7 @@ var INSTRUMENTATION_NAMES = {
1358
1365
  GENKIT: "genkit",
1359
1366
  GITHUB_COPILOT: "github-copilot",
1360
1367
  GOOGLE_ADK: "google-adk",
1368
+ GOOGLE_GENERATIVE_AI: "google-generative-ai",
1361
1369
  GOOGLE_GENAI: "google-genai",
1362
1370
  GROQ: "groq",
1363
1371
  HUGGINGFACE: "huggingface",
@@ -1365,6 +1373,7 @@ var INSTRUMENTATION_NAMES = {
1365
1373
  LANGSMITH: "langsmith",
1366
1374
  MASTRA: "mastra",
1367
1375
  MISTRAL: "mistral",
1376
+ LANGGRAPH_SDK: "langgraph-sdk",
1368
1377
  OLLAMA: "ollama",
1369
1378
  OPENAI: "openai",
1370
1379
  OPENAI_AGENTS: "openai-agents",
@@ -1373,7 +1382,8 @@ var INSTRUMENTATION_NAMES = {
1373
1382
  OPENROUTER_AGENT: "openrouter-agent",
1374
1383
  PI_CODING_AGENT: "pi-coding-agent",
1375
1384
  STRANDS_AGENT_SDK: "strands-agent-sdk",
1376
- VOYAGEAI: "voyageai"
1385
+ VOYAGEAI: "voyageai",
1386
+ ELEVENLABS: "elevenlabs"
1377
1387
  };
1378
1388
 
1379
1389
  // src/instrumentation/plugins/ai-sdk-channels.ts
@@ -1481,8 +1491,8 @@ var harnessAgentChannels = defineChannels(
1481
1491
  // src/auto-instrumentations/configs/ai-sdk.ts
1482
1492
  var aiSDKConfigs = [
1483
1493
  // HarnessAgent turn methods are published only from the package's ESM
1484
- // `./agent` entrypoint. The compiled class expression is anonymous, so match
1485
- // the first async method with each public name instead of a class name.
1494
+ // `./agent` entrypoint. Target the class binding so similarly named getters
1495
+ // on stream result classes are not mistaken for agent turn methods.
1486
1496
  ...[
1487
1497
  ["createSession", harnessAgentChannels.createSession.channelName],
1488
1498
  ["generate", harnessAgentChannels.generate.channelName],
@@ -1497,6 +1507,7 @@ var aiSDKConfigs = [
1497
1507
  filePath: "dist/agent/index.js"
1498
1508
  },
1499
1509
  functionQuery: {
1510
+ className: "HarnessAgent",
1500
1511
  methodName,
1501
1512
  kind: "Async",
1502
1513
  index: 0
@@ -1930,9 +1941,9 @@ var anthropicChannels = defineChannels(
1930
1941
  // src/auto-instrumentations/configs/anthropic.ts
1931
1942
  var anthropicConfigs = [
1932
1943
  // Each logical target is listed for both published module formats:
1933
- // `.mjs` covers ESM imports, while `.js` covers CJS requires. The Bedrock
1934
- // SDK delegates CJS `messages.create` calls through these Anthropic SDK
1935
- // `.js` resource files.
1944
+ // `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
1945
+ // @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
1946
+ // shared Anthropic resources, so they use the same targets and channels.
1936
1947
  // Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
1937
1948
  {
1938
1949
  channelName: anthropicChannels.messagesCreate.channelName,
@@ -3243,6 +3254,40 @@ var googleADKConfigs = [
3243
3254
  }
3244
3255
  ];
3245
3256
 
3257
+ // src/instrumentation/plugins/google-generative-ai-channels.ts
3258
+ var googleGenerativeAIChannels = defineChannels(
3259
+ "@google/generative-ai",
3260
+ {
3261
+ generateContent: channel({ channelName: "GenerativeModel.generateContent", kind: "async" }),
3262
+ generateContentStream: channel({ channelName: "GenerativeModel.generateContentStream", kind: "async" }),
3263
+ embedContent: channel({ channelName: "GenerativeModel.embedContent", kind: "async" }),
3264
+ batchEmbedContents: channel({ channelName: "GenerativeModel.batchEmbedContents", kind: "async" }),
3265
+ sendMessage: channel({ channelName: "ChatSession.sendMessage", kind: "async" }),
3266
+ sendMessageStream: channel({ channelName: "ChatSession.sendMessageStream", kind: "async" })
3267
+ },
3268
+ { instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENERATIVE_AI }
3269
+ );
3270
+
3271
+ // src/auto-instrumentations/configs/google-generative-ai.ts
3272
+ var googleGenerativeAIConfigs = [
3273
+ "dist/index.js",
3274
+ "dist/index.mjs"
3275
+ ].flatMap(
3276
+ (filePath) => Object.entries(googleGenerativeAIChannels).map(([methodName, channel2]) => ({
3277
+ channelName: channel2.channelName,
3278
+ module: {
3279
+ name: "@google/generative-ai",
3280
+ versionRange: ">=0.24.0 <0.25.0",
3281
+ filePath
3282
+ },
3283
+ functionQuery: {
3284
+ className: methodName.startsWith("sendMessage") ? "ChatSession" : "GenerativeModel",
3285
+ methodName,
3286
+ kind: "Async"
3287
+ }
3288
+ }))
3289
+ );
3290
+
3246
3291
  // src/instrumentation/plugins/google-genai-channels.ts
3247
3292
  var googleGenAIChannels = defineChannels(
3248
3293
  "@google/genai",
@@ -3259,6 +3304,10 @@ var googleGenAIChannels = defineChannels(
3259
3304
  channelName: "models.embedContent",
3260
3305
  kind: "async"
3261
3306
  }),
3307
+ httpResponseJson: channel({
3308
+ channelName: "httpResponse.json",
3309
+ kind: "async"
3310
+ }),
3262
3311
  interactionsCreate: channel({
3263
3312
  channelName: "interactions.create",
3264
3313
  kind: "async"
@@ -3328,6 +3377,21 @@ var googleGenAIConfigs = [
3328
3377
  kind: "Async"
3329
3378
  }
3330
3379
  },
3380
+ // The SDK's embedding response converter drops usageMetadata. Observe the
3381
+ // parsed HTTP response before conversion; the plugin scopes this to embeddings.
3382
+ {
3383
+ channelName: googleGenAIChannels.httpResponseJson.channelName,
3384
+ module: {
3385
+ name: "@google/genai",
3386
+ versionRange: ">=1.0.0",
3387
+ filePath: "dist/node/index.mjs"
3388
+ },
3389
+ functionQuery: {
3390
+ className: "HttpResponse",
3391
+ methodName: "json",
3392
+ kind: "Async"
3393
+ }
3394
+ },
3331
3395
  // BaseInteractions.create - Interactions API entry point
3332
3396
  {
3333
3397
  channelName: googleGenAIChannels.interactionsCreate.channelName,
@@ -4183,6 +4247,42 @@ var mistralConfigs = [
4183
4247
  }
4184
4248
  ];
4185
4249
 
4250
+ // src/instrumentation/plugins/langgraph-sdk-channels.ts
4251
+ var langGraphSDKChannels = defineChannels(
4252
+ "@langchain/langgraph-sdk",
4253
+ {
4254
+ wait: channel({
4255
+ channelName: "runs.wait",
4256
+ kind: "async"
4257
+ }),
4258
+ stream: channel({
4259
+ channelName: "runs.stream",
4260
+ kind: "sync-stream"
4261
+ })
4262
+ },
4263
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
4264
+ );
4265
+
4266
+ // src/auto-instrumentations/configs/langgraph-sdk.ts
4267
+ var langGraphSDKConfigs = [
4268
+ "js",
4269
+ "cjs"
4270
+ ].flatMap(
4271
+ (extension) => ["wait", "stream"].map((methodName) => ({
4272
+ channelName: langGraphSDKChannels[methodName].channelName,
4273
+ module: {
4274
+ name: "@langchain/langgraph-sdk",
4275
+ versionRange: ">=1.9.25 <2.0.0",
4276
+ filePath: `dist/client/runs/index.${extension}`
4277
+ },
4278
+ functionQuery: {
4279
+ className: "RunsClient",
4280
+ methodName,
4281
+ kind: methodName === "stream" ? "Sync" : "Async"
4282
+ }
4283
+ }))
4284
+ );
4285
+
4186
4286
  // src/instrumentation/plugins/ollama-channels.ts
4187
4287
  var ollamaChannels = defineChannels(
4188
4288
  "ollama",
@@ -4281,6 +4381,18 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
4281
4381
  var openAIChannels = defineChannels(
4282
4382
  "openai",
4283
4383
  {
4384
+ agentsTraceStart: channel({
4385
+ channelName: "agents.trace.start",
4386
+ kind: "async"
4387
+ }),
4388
+ agentsTraceCapture: channel({
4389
+ channelName: "agents.trace.capture",
4390
+ kind: "async"
4391
+ }),
4392
+ agentsTraceFail: channel({
4393
+ channelName: "agents.trace.fail",
4394
+ kind: "async"
4395
+ }),
4284
4396
  filesCreateTraced: channel({
4285
4397
  channelName: "files.create-traced",
4286
4398
  kind: "async"
@@ -4807,6 +4919,60 @@ var strandsAgentSDKConfigs = [
4807
4919
  }
4808
4920
  ];
4809
4921
 
4922
+ // src/instrumentation/plugins/elevenlabs-channels.ts
4923
+ var elevenLabsChannels = defineChannels(
4924
+ "@elevenlabs/elevenlabs-js",
4925
+ {
4926
+ convert: channel({
4927
+ channelName: "textToSpeech.convert",
4928
+ kind: "async"
4929
+ }),
4930
+ stream: channel({
4931
+ channelName: "textToSpeech.stream",
4932
+ kind: "async"
4933
+ }),
4934
+ convertWithTimestamps: channel({ channelName: "textToSpeech.convertWithTimestamps", kind: "async" }),
4935
+ streamWithTimestamps: channel({ channelName: "textToSpeech.streamWithTimestamps", kind: "async" }),
4936
+ transcribe: channel({ channelName: "speechToText.convert", kind: "async" })
4937
+ },
4938
+ { instrumentationName: INSTRUMENTATION_NAMES.ELEVENLABS }
4939
+ );
4940
+
4941
+ // src/auto-instrumentations/configs/elevenlabs.ts
4942
+ var elevenLabsConfigs = [
4943
+ ...[
4944
+ "convert",
4945
+ "stream",
4946
+ "convertWithTimestamps",
4947
+ "streamWithTimestamps"
4948
+ ].map((methodName) => ({
4949
+ channelName: elevenLabsChannels[methodName].channelName,
4950
+ module: {
4951
+ name: "@elevenlabs/elevenlabs-js",
4952
+ versionRange: ">=2.67.0 <3.0.0",
4953
+ filePath: "api/resources/textToSpeech/client/Client.js"
4954
+ },
4955
+ functionQuery: {
4956
+ className: "TextToSpeechClient",
4957
+ methodName,
4958
+ kind: "Async"
4959
+ }
4960
+ })),
4961
+ {
4962
+ channelName: elevenLabsChannels.transcribe.channelName,
4963
+ module: {
4964
+ name: "@elevenlabs/elevenlabs-js",
4965
+ versionRange: ">=2.67.0 <3.0.0",
4966
+ filePath: "api/resources/speechToText/client/Client.js"
4967
+ },
4968
+ functionQuery: {
4969
+ className: "SpeechToTextClient",
4970
+ methodName: "convert",
4971
+ kind: "Async"
4972
+ }
4973
+ }
4974
+ ];
4975
+
4810
4976
  // src/instrumentation/plugins/voyageai-channels.ts
4811
4977
  var voyageAIChannels = defineChannels(
4812
4978
  "voyageai",
@@ -4915,6 +5081,10 @@ var defaultInstrumentationConfigGroups = [
4915
5081
  integrations: ["openAIAgents"],
4916
5082
  configs: openAIAgentsCoreConfigs
4917
5083
  },
5084
+ {
5085
+ integrations: ["googleGenerativeAI"],
5086
+ configs: googleGenerativeAIConfigs
5087
+ },
4918
5088
  {
4919
5089
  integrations: ["google", "googleGenAI"],
4920
5090
  configs: googleGenAIConfigs
@@ -4934,6 +5104,7 @@ var defaultInstrumentationConfigGroups = [
4934
5104
  configs: openRouterAgentConfigs
4935
5105
  },
4936
5106
  { integrations: ["mistral"], configs: mistralConfigs },
5107
+ { integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
4937
5108
  { integrations: ["ollama"], configs: ollamaConfigs },
4938
5109
  { integrations: ["googleADK"], configs: googleADKConfigs },
4939
5110
  { integrations: ["cohere"], configs: cohereConfigs },
@@ -4958,6 +5129,10 @@ var defaultInstrumentationConfigGroups = [
4958
5129
  integrations: ["flue"],
4959
5130
  configs: flueConfigs
4960
5131
  },
5132
+ {
5133
+ integrations: ["elevenlabs"],
5134
+ configs: elevenLabsConfigs
5135
+ },
4961
5136
  {
4962
5137
  integrations: ["voyageai"],
4963
5138
  configs: voyageAIConfigs
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  webpackPlugin
3
- } from "../chunk-OXINGIEZ.mjs";
4
- import "../chunk-LW4HDHXT.mjs";
5
- import "../chunk-U64OYU4Q.mjs";
3
+ } from "../chunk-W5QNG3PV.mjs";
4
+ import "../chunk-UHJ2DNYJ.mjs";
5
+ import "../chunk-T2DMPWFI.mjs";
6
6
  import "../chunk-I55G56ZL.mjs";
7
7
  import "../chunk-JPUFNW7X.mjs";
8
8
  import "../chunk-P5YLNB2A.mjs";
@@ -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";