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.
- package/README.md +0 -43
- package/dev/dist/index.d.mts +767 -0
- package/dev/dist/index.d.ts +767 -0
- package/dev/dist/index.js +3115 -908
- package/dev/dist/index.mjs +2466 -259
- package/dist/apply-auto-instrumentation.js +325 -221
- package/dist/apply-auto-instrumentation.mjs +110 -6
- package/dist/auto-instrumentations/bundler/esbuild.cjs +182 -7
- package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
- package/dist/auto-instrumentations/bundler/next.cjs +182 -7
- package/dist/auto-instrumentations/bundler/next.mjs +3 -3
- package/dist/auto-instrumentations/bundler/rollup.cjs +182 -7
- package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
- package/dist/auto-instrumentations/bundler/vite.cjs +182 -7
- package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +182 -7
- package/dist/auto-instrumentations/bundler/webpack.cjs +182 -7
- package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
- package/dist/auto-instrumentations/{chunk-U64OYU4Q.mjs → chunk-T2DMPWFI.mjs} +113 -6
- package/dist/auto-instrumentations/{chunk-LW4HDHXT.mjs → chunk-UHJ2DNYJ.mjs} +74 -2
- package/dist/auto-instrumentations/{chunk-OXINGIEZ.mjs → chunk-W5QNG3PV.mjs} +1 -1
- package/dist/auto-instrumentations/hook.mjs +209 -9
- package/dist/auto-instrumentations/index.cjs +115 -6
- package/dist/auto-instrumentations/index.d.mts +5 -1
- package/dist/auto-instrumentations/index.d.ts +5 -1
- package/dist/auto-instrumentations/index.mjs +5 -1
- package/dist/browser.d.mts +2324 -342
- package/dist/browser.d.ts +2324 -342
- package/dist/browser.js +3573 -626
- package/dist/browser.mjs +3573 -626
- package/dist/chunk-7P6ASYW6.mjs +9 -0
- package/dist/{chunk-V32LW47Z.js → chunk-AXJTOUOC.js} +3022 -1131
- package/dist/{chunk-4AQGZS6X.js → chunk-G3VHOHRC.js} +85 -11
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/{chunk-AJT4FR25.mjs → chunk-MZLBAFVJ.mjs} +2051 -160
- package/dist/{chunk-CE3BLB2L.mjs → chunk-TZVZN2JJ.mjs} +84 -10
- package/dist/cli.js +2614 -297
- package/dist/custom-views.d.mts +112 -0
- package/dist/custom-views.d.ts +112 -0
- package/dist/custom-views.js +13 -0
- package/dist/custom-views.mjs +13 -0
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +3573 -626
- package/dist/edge-light.mjs +3573 -626
- package/dist/index.d.mts +2324 -342
- package/dist/index.d.ts +2324 -342
- package/dist/index.js +1959 -969
- package/dist/index.mjs +1450 -460
- package/dist/instrumentation/index.d.mts +439 -245
- package/dist/instrumentation/index.d.ts +439 -245
- package/dist/instrumentation/index.js +2550 -258
- package/dist/instrumentation/index.mjs +2550 -258
- package/dist/vitest-evals-reporter.js +17 -16
- package/dist/vitest-evals-reporter.mjs +3 -2
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +3573 -626
- package/dist/workerd.mjs +3573 -626
- package/package.json +10 -2
- package/util/dist/index.d.mts +326 -0
- 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.
|
|
1484
|
-
//
|
|
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.
|
|
1933
|
-
//
|
|
1934
|
-
//
|
|
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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
braintrustWebpackPlugin,
|
|
3
3
|
webpackPlugin
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-W5QNG3PV.mjs";
|
|
5
|
+
import "../chunk-UHJ2DNYJ.mjs";
|
|
6
|
+
import "../chunk-T2DMPWFI.mjs";
|
|
7
7
|
import "../chunk-I55G56ZL.mjs";
|
|
8
8
|
import "../chunk-JPUFNW7X.mjs";
|
|
9
9
|
import "../chunk-P5YLNB2A.mjs";
|
|
@@ -119,6 +119,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
119
119
|
GENKIT: "genkit",
|
|
120
120
|
GITHUB_COPILOT: "github-copilot",
|
|
121
121
|
GOOGLE_ADK: "google-adk",
|
|
122
|
+
GOOGLE_GENERATIVE_AI: "google-generative-ai",
|
|
122
123
|
GOOGLE_GENAI: "google-genai",
|
|
123
124
|
GROQ: "groq",
|
|
124
125
|
HUGGINGFACE: "huggingface",
|
|
@@ -126,6 +127,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
126
127
|
LANGSMITH: "langsmith",
|
|
127
128
|
MASTRA: "mastra",
|
|
128
129
|
MISTRAL: "mistral",
|
|
130
|
+
LANGGRAPH_SDK: "langgraph-sdk",
|
|
129
131
|
OLLAMA: "ollama",
|
|
130
132
|
OPENAI: "openai",
|
|
131
133
|
OPENAI_AGENTS: "openai-agents",
|
|
@@ -134,13 +136,26 @@ var INSTRUMENTATION_NAMES = {
|
|
|
134
136
|
OPENROUTER_AGENT: "openrouter-agent",
|
|
135
137
|
PI_CODING_AGENT: "pi-coding-agent",
|
|
136
138
|
STRANDS_AGENT_SDK: "strands-agent-sdk",
|
|
137
|
-
VOYAGEAI: "voyageai"
|
|
139
|
+
VOYAGEAI: "voyageai",
|
|
140
|
+
ELEVENLABS: "elevenlabs"
|
|
138
141
|
};
|
|
139
142
|
|
|
140
143
|
// src/instrumentation/plugins/openai-channels.ts
|
|
141
144
|
var openAIChannels = defineChannels(
|
|
142
145
|
"openai",
|
|
143
146
|
{
|
|
147
|
+
agentsTraceStart: channel({
|
|
148
|
+
channelName: "agents.trace.start",
|
|
149
|
+
kind: "async"
|
|
150
|
+
}),
|
|
151
|
+
agentsTraceCapture: channel({
|
|
152
|
+
channelName: "agents.trace.capture",
|
|
153
|
+
kind: "async"
|
|
154
|
+
}),
|
|
155
|
+
agentsTraceFail: channel({
|
|
156
|
+
channelName: "agents.trace.fail",
|
|
157
|
+
kind: "async"
|
|
158
|
+
}),
|
|
144
159
|
filesCreateTraced: channel({
|
|
145
160
|
channelName: "files.create-traced",
|
|
146
161
|
kind: "async"
|
|
@@ -450,9 +465,9 @@ var anthropicChannels = defineChannels(
|
|
|
450
465
|
// src/auto-instrumentations/configs/anthropic.ts
|
|
451
466
|
var anthropicConfigs = [
|
|
452
467
|
// Each logical target is listed for both published module formats:
|
|
453
|
-
// `.mjs` covers ESM imports, while `.js` covers CJS requires.
|
|
454
|
-
//
|
|
455
|
-
//
|
|
468
|
+
// `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
|
|
469
|
+
// @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
|
|
470
|
+
// shared Anthropic resources, so they use the same targets and channels.
|
|
456
471
|
// Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
|
|
457
472
|
{
|
|
458
473
|
channelName: anthropicChannels.messagesCreate.channelName,
|
|
@@ -784,8 +799,8 @@ var harnessAgentChannels = defineChannels(
|
|
|
784
799
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
785
800
|
var aiSDKConfigs = [
|
|
786
801
|
// HarnessAgent turn methods are published only from the package's ESM
|
|
787
|
-
// `./agent` entrypoint.
|
|
788
|
-
//
|
|
802
|
+
// `./agent` entrypoint. Target the class binding so similarly named getters
|
|
803
|
+
// on stream result classes are not mistaken for agent turn methods.
|
|
789
804
|
...[
|
|
790
805
|
["createSession", harnessAgentChannels.createSession.channelName],
|
|
791
806
|
["generate", harnessAgentChannels.generate.channelName],
|
|
@@ -800,6 +815,7 @@ var aiSDKConfigs = [
|
|
|
800
815
|
filePath: "dist/agent/index.js"
|
|
801
816
|
},
|
|
802
817
|
functionQuery: {
|
|
818
|
+
className: "HarnessAgent",
|
|
803
819
|
methodName,
|
|
804
820
|
kind: "Async",
|
|
805
821
|
index: 0
|
|
@@ -1423,6 +1439,40 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
|
|
|
1423
1439
|
)
|
|
1424
1440
|
);
|
|
1425
1441
|
|
|
1442
|
+
// src/instrumentation/plugins/google-generative-ai-channels.ts
|
|
1443
|
+
var googleGenerativeAIChannels = defineChannels(
|
|
1444
|
+
"@google/generative-ai",
|
|
1445
|
+
{
|
|
1446
|
+
generateContent: channel({ channelName: "GenerativeModel.generateContent", kind: "async" }),
|
|
1447
|
+
generateContentStream: channel({ channelName: "GenerativeModel.generateContentStream", kind: "async" }),
|
|
1448
|
+
embedContent: channel({ channelName: "GenerativeModel.embedContent", kind: "async" }),
|
|
1449
|
+
batchEmbedContents: channel({ channelName: "GenerativeModel.batchEmbedContents", kind: "async" }),
|
|
1450
|
+
sendMessage: channel({ channelName: "ChatSession.sendMessage", kind: "async" }),
|
|
1451
|
+
sendMessageStream: channel({ channelName: "ChatSession.sendMessageStream", kind: "async" })
|
|
1452
|
+
},
|
|
1453
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENERATIVE_AI }
|
|
1454
|
+
);
|
|
1455
|
+
|
|
1456
|
+
// src/auto-instrumentations/configs/google-generative-ai.ts
|
|
1457
|
+
var googleGenerativeAIConfigs = [
|
|
1458
|
+
"dist/index.js",
|
|
1459
|
+
"dist/index.mjs"
|
|
1460
|
+
].flatMap(
|
|
1461
|
+
(filePath) => Object.entries(googleGenerativeAIChannels).map(([methodName, channel2]) => ({
|
|
1462
|
+
channelName: channel2.channelName,
|
|
1463
|
+
module: {
|
|
1464
|
+
name: "@google/generative-ai",
|
|
1465
|
+
versionRange: ">=0.24.0 <0.25.0",
|
|
1466
|
+
filePath
|
|
1467
|
+
},
|
|
1468
|
+
functionQuery: {
|
|
1469
|
+
className: methodName.startsWith("sendMessage") ? "ChatSession" : "GenerativeModel",
|
|
1470
|
+
methodName,
|
|
1471
|
+
kind: "Async"
|
|
1472
|
+
}
|
|
1473
|
+
}))
|
|
1474
|
+
);
|
|
1475
|
+
|
|
1426
1476
|
// src/instrumentation/plugins/google-genai-channels.ts
|
|
1427
1477
|
var googleGenAIChannels = defineChannels(
|
|
1428
1478
|
"@google/genai",
|
|
@@ -1439,6 +1489,10 @@ var googleGenAIChannels = defineChannels(
|
|
|
1439
1489
|
channelName: "models.embedContent",
|
|
1440
1490
|
kind: "async"
|
|
1441
1491
|
}),
|
|
1492
|
+
httpResponseJson: channel({
|
|
1493
|
+
channelName: "httpResponse.json",
|
|
1494
|
+
kind: "async"
|
|
1495
|
+
}),
|
|
1442
1496
|
interactionsCreate: channel({
|
|
1443
1497
|
channelName: "interactions.create",
|
|
1444
1498
|
kind: "async"
|
|
@@ -1508,6 +1562,21 @@ var googleGenAIConfigs = [
|
|
|
1508
1562
|
kind: "Async"
|
|
1509
1563
|
}
|
|
1510
1564
|
},
|
|
1565
|
+
// The SDK's embedding response converter drops usageMetadata. Observe the
|
|
1566
|
+
// parsed HTTP response before conversion; the plugin scopes this to embeddings.
|
|
1567
|
+
{
|
|
1568
|
+
channelName: googleGenAIChannels.httpResponseJson.channelName,
|
|
1569
|
+
module: {
|
|
1570
|
+
name: "@google/genai",
|
|
1571
|
+
versionRange: ">=1.0.0",
|
|
1572
|
+
filePath: "dist/node/index.mjs"
|
|
1573
|
+
},
|
|
1574
|
+
functionQuery: {
|
|
1575
|
+
className: "HttpResponse",
|
|
1576
|
+
methodName: "json",
|
|
1577
|
+
kind: "Async"
|
|
1578
|
+
}
|
|
1579
|
+
},
|
|
1511
1580
|
// BaseInteractions.create - Interactions API entry point
|
|
1512
1581
|
{
|
|
1513
1582
|
channelName: googleGenAIChannels.interactionsCreate.channelName,
|
|
@@ -2292,6 +2361,42 @@ var mistralConfigs = [
|
|
|
2292
2361
|
}
|
|
2293
2362
|
];
|
|
2294
2363
|
|
|
2364
|
+
// src/instrumentation/plugins/langgraph-sdk-channels.ts
|
|
2365
|
+
var langGraphSDKChannels = defineChannels(
|
|
2366
|
+
"@langchain/langgraph-sdk",
|
|
2367
|
+
{
|
|
2368
|
+
wait: channel({
|
|
2369
|
+
channelName: "runs.wait",
|
|
2370
|
+
kind: "async"
|
|
2371
|
+
}),
|
|
2372
|
+
stream: channel({
|
|
2373
|
+
channelName: "runs.stream",
|
|
2374
|
+
kind: "sync-stream"
|
|
2375
|
+
})
|
|
2376
|
+
},
|
|
2377
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
|
|
2378
|
+
);
|
|
2379
|
+
|
|
2380
|
+
// src/auto-instrumentations/configs/langgraph-sdk.ts
|
|
2381
|
+
var langGraphSDKConfigs = [
|
|
2382
|
+
"js",
|
|
2383
|
+
"cjs"
|
|
2384
|
+
].flatMap(
|
|
2385
|
+
(extension) => ["wait", "stream"].map((methodName) => ({
|
|
2386
|
+
channelName: langGraphSDKChannels[methodName].channelName,
|
|
2387
|
+
module: {
|
|
2388
|
+
name: "@langchain/langgraph-sdk",
|
|
2389
|
+
versionRange: ">=1.9.25 <2.0.0",
|
|
2390
|
+
filePath: `dist/client/runs/index.${extension}`
|
|
2391
|
+
},
|
|
2392
|
+
functionQuery: {
|
|
2393
|
+
className: "RunsClient",
|
|
2394
|
+
methodName,
|
|
2395
|
+
kind: methodName === "stream" ? "Sync" : "Async"
|
|
2396
|
+
}
|
|
2397
|
+
}))
|
|
2398
|
+
);
|
|
2399
|
+
|
|
2295
2400
|
// src/instrumentation/plugins/ollama-channels.ts
|
|
2296
2401
|
var ollamaChannels = defineChannels(
|
|
2297
2402
|
"ollama",
|
|
@@ -3412,11 +3517,13 @@ export {
|
|
|
3412
3517
|
cloudflareThinkConfigs,
|
|
3413
3518
|
cursorSDKConfigs,
|
|
3414
3519
|
openAIAgentsCoreConfigs,
|
|
3520
|
+
googleGenerativeAIConfigs,
|
|
3415
3521
|
googleGenAIConfigs,
|
|
3416
3522
|
huggingFaceConfigs,
|
|
3417
3523
|
openRouterAgentConfigs,
|
|
3418
3524
|
openRouterConfigs,
|
|
3419
3525
|
mistralConfigs,
|
|
3526
|
+
langGraphSDKConfigs,
|
|
3420
3527
|
ollamaConfigs,
|
|
3421
3528
|
googleADKConfigs,
|
|
3422
3529
|
cloudflareAIChatConfigs,
|
|
@@ -15,8 +15,10 @@ import {
|
|
|
15
15
|
gitHubCopilotConfigs,
|
|
16
16
|
googleADKConfigs,
|
|
17
17
|
googleGenAIConfigs,
|
|
18
|
+
googleGenerativeAIConfigs,
|
|
18
19
|
groqConfigs,
|
|
19
20
|
huggingFaceConfigs,
|
|
21
|
+
langGraphSDKConfigs,
|
|
20
22
|
langSmithConfigs,
|
|
21
23
|
langchainConfigs,
|
|
22
24
|
mistralConfigs,
|
|
@@ -27,7 +29,7 @@ import {
|
|
|
27
29
|
openRouterConfigs,
|
|
28
30
|
openaiConfigs,
|
|
29
31
|
piCodingAgentConfigs
|
|
30
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-T2DMPWFI.mjs";
|
|
31
33
|
import {
|
|
32
34
|
applySpecialCasePatch,
|
|
33
35
|
create
|
|
@@ -85,6 +87,8 @@ var envIntegrationAliases = {
|
|
|
85
87
|
"openai-agents-core": "openAIAgents",
|
|
86
88
|
openaiagentscore: "openAIAgents",
|
|
87
89
|
google: "google",
|
|
90
|
+
"google-generative-ai": "googleGenerativeAI",
|
|
91
|
+
googlegenerativeai: "googleGenerativeAI",
|
|
88
92
|
"google-genai": "googleGenAI",
|
|
89
93
|
googlegenai: "googleGenAI",
|
|
90
94
|
huggingface: "huggingface",
|
|
@@ -115,10 +119,15 @@ var envIntegrationAliases = {
|
|
|
115
119
|
"langchain-js": "langchain",
|
|
116
120
|
"@langchain": "langchain",
|
|
117
121
|
langgraph: "langgraph",
|
|
122
|
+
langgraphsdk: "langgraphSDK",
|
|
123
|
+
"langgraph-sdk": "langgraphSDK",
|
|
124
|
+
"@langchain/langgraph-sdk": "langgraphSDK",
|
|
118
125
|
langsmith: "langsmith",
|
|
119
126
|
voyage: "voyageai",
|
|
120
127
|
"voyage-ai": "voyageai",
|
|
121
|
-
voyageai: "voyageai"
|
|
128
|
+
voyageai: "voyageai",
|
|
129
|
+
elevenlabs: "elevenlabs",
|
|
130
|
+
"@elevenlabs/elevenlabs-js": "elevenlabs"
|
|
122
131
|
};
|
|
123
132
|
function readDisabledInstrumentationEnvConfig(disabledList) {
|
|
124
133
|
const integrations = {};
|
|
@@ -307,6 +316,60 @@ var strandsAgentSDKConfigs = [
|
|
|
307
316
|
}
|
|
308
317
|
];
|
|
309
318
|
|
|
319
|
+
// src/instrumentation/plugins/elevenlabs-channels.ts
|
|
320
|
+
var elevenLabsChannels = defineChannels(
|
|
321
|
+
"@elevenlabs/elevenlabs-js",
|
|
322
|
+
{
|
|
323
|
+
convert: channel({
|
|
324
|
+
channelName: "textToSpeech.convert",
|
|
325
|
+
kind: "async"
|
|
326
|
+
}),
|
|
327
|
+
stream: channel({
|
|
328
|
+
channelName: "textToSpeech.stream",
|
|
329
|
+
kind: "async"
|
|
330
|
+
}),
|
|
331
|
+
convertWithTimestamps: channel({ channelName: "textToSpeech.convertWithTimestamps", kind: "async" }),
|
|
332
|
+
streamWithTimestamps: channel({ channelName: "textToSpeech.streamWithTimestamps", kind: "async" }),
|
|
333
|
+
transcribe: channel({ channelName: "speechToText.convert", kind: "async" })
|
|
334
|
+
},
|
|
335
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.ELEVENLABS }
|
|
336
|
+
);
|
|
337
|
+
|
|
338
|
+
// src/auto-instrumentations/configs/elevenlabs.ts
|
|
339
|
+
var elevenLabsConfigs = [
|
|
340
|
+
...[
|
|
341
|
+
"convert",
|
|
342
|
+
"stream",
|
|
343
|
+
"convertWithTimestamps",
|
|
344
|
+
"streamWithTimestamps"
|
|
345
|
+
].map((methodName) => ({
|
|
346
|
+
channelName: elevenLabsChannels[methodName].channelName,
|
|
347
|
+
module: {
|
|
348
|
+
name: "@elevenlabs/elevenlabs-js",
|
|
349
|
+
versionRange: ">=2.67.0 <3.0.0",
|
|
350
|
+
filePath: "api/resources/textToSpeech/client/Client.js"
|
|
351
|
+
},
|
|
352
|
+
functionQuery: {
|
|
353
|
+
className: "TextToSpeechClient",
|
|
354
|
+
methodName,
|
|
355
|
+
kind: "Async"
|
|
356
|
+
}
|
|
357
|
+
})),
|
|
358
|
+
{
|
|
359
|
+
channelName: elevenLabsChannels.transcribe.channelName,
|
|
360
|
+
module: {
|
|
361
|
+
name: "@elevenlabs/elevenlabs-js",
|
|
362
|
+
versionRange: ">=2.67.0 <3.0.0",
|
|
363
|
+
filePath: "api/resources/speechToText/client/Client.js"
|
|
364
|
+
},
|
|
365
|
+
functionQuery: {
|
|
366
|
+
className: "SpeechToTextClient",
|
|
367
|
+
methodName: "convert",
|
|
368
|
+
kind: "Async"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
];
|
|
372
|
+
|
|
310
373
|
// src/instrumentation/plugins/voyageai-channels.ts
|
|
311
374
|
var voyageAIChannels = defineChannels(
|
|
312
375
|
"voyageai",
|
|
@@ -415,6 +478,10 @@ var defaultInstrumentationConfigGroups = [
|
|
|
415
478
|
integrations: ["openAIAgents"],
|
|
416
479
|
configs: openAIAgentsCoreConfigs
|
|
417
480
|
},
|
|
481
|
+
{
|
|
482
|
+
integrations: ["googleGenerativeAI"],
|
|
483
|
+
configs: googleGenerativeAIConfigs
|
|
484
|
+
},
|
|
418
485
|
{
|
|
419
486
|
integrations: ["google", "googleGenAI"],
|
|
420
487
|
configs: googleGenAIConfigs
|
|
@@ -434,6 +501,7 @@ var defaultInstrumentationConfigGroups = [
|
|
|
434
501
|
configs: openRouterAgentConfigs
|
|
435
502
|
},
|
|
436
503
|
{ integrations: ["mistral"], configs: mistralConfigs },
|
|
504
|
+
{ integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
|
|
437
505
|
{ integrations: ["ollama"], configs: ollamaConfigs },
|
|
438
506
|
{ integrations: ["googleADK"], configs: googleADKConfigs },
|
|
439
507
|
{ integrations: ["cohere"], configs: cohereConfigs },
|
|
@@ -458,6 +526,10 @@ var defaultInstrumentationConfigGroups = [
|
|
|
458
526
|
integrations: ["flue"],
|
|
459
527
|
configs: flueConfigs
|
|
460
528
|
},
|
|
529
|
+
{
|
|
530
|
+
integrations: ["elevenlabs"],
|
|
531
|
+
configs: elevenLabsConfigs
|
|
532
|
+
},
|
|
461
533
|
{
|
|
462
534
|
integrations: ["voyageai"],
|
|
463
535
|
configs: voyageAIConfigs
|