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
|
@@ -54,6 +54,8 @@ var envIntegrationAliases = {
|
|
|
54
54
|
"openai-agents-core": "openAIAgents",
|
|
55
55
|
openaiagentscore: "openAIAgents",
|
|
56
56
|
google: "google",
|
|
57
|
+
"google-generative-ai": "googleGenerativeAI",
|
|
58
|
+
googlegenerativeai: "googleGenerativeAI",
|
|
57
59
|
"google-genai": "googleGenAI",
|
|
58
60
|
googlegenai: "googleGenAI",
|
|
59
61
|
huggingface: "huggingface",
|
|
@@ -84,10 +86,15 @@ var envIntegrationAliases = {
|
|
|
84
86
|
"langchain-js": "langchain",
|
|
85
87
|
"@langchain": "langchain",
|
|
86
88
|
langgraph: "langgraph",
|
|
89
|
+
langgraphsdk: "langgraphSDK",
|
|
90
|
+
"langgraph-sdk": "langgraphSDK",
|
|
91
|
+
"@langchain/langgraph-sdk": "langgraphSDK",
|
|
87
92
|
langsmith: "langsmith",
|
|
88
93
|
voyage: "voyageai",
|
|
89
94
|
"voyage-ai": "voyageai",
|
|
90
|
-
voyageai: "voyageai"
|
|
95
|
+
voyageai: "voyageai",
|
|
96
|
+
elevenlabs: "elevenlabs",
|
|
97
|
+
"@elevenlabs/elevenlabs-js": "elevenlabs"
|
|
91
98
|
};
|
|
92
99
|
function readDisabledInstrumentationEnvConfig(disabledList) {
|
|
93
100
|
const integrations = {};
|
|
@@ -2117,6 +2124,14 @@ var ChatCompletionContentPartImageWithTitle = z6.object({
|
|
|
2117
2124
|
ttl: z6.enum(["5m", "1h"]).optional()
|
|
2118
2125
|
}).optional()
|
|
2119
2126
|
});
|
|
2127
|
+
var ChatCompletionContentPartInputAudioWithTitle = z6.object({
|
|
2128
|
+
input_audio: z6.object({ data: z6.string(), format: z6.enum(["wav", "mp3"]) }),
|
|
2129
|
+
type: z6.literal("input_audio"),
|
|
2130
|
+
cache_control: z6.object({
|
|
2131
|
+
type: z6.literal("ephemeral"),
|
|
2132
|
+
ttl: z6.enum(["5m", "1h"]).optional()
|
|
2133
|
+
}).optional()
|
|
2134
|
+
});
|
|
2120
2135
|
var ChatCompletionContentPartFileFile = z6.object({ file_data: z6.string(), filename: z6.string(), file_id: z6.string() }).partial();
|
|
2121
2136
|
var ChatCompletionContentPartFileWithTitle = z6.object({
|
|
2122
2137
|
file: ChatCompletionContentPartFileFile,
|
|
@@ -2129,6 +2144,7 @@ var ChatCompletionContentPartFileWithTitle = z6.object({
|
|
|
2129
2144
|
var ChatCompletionContentPart = z6.union([
|
|
2130
2145
|
ChatCompletionContentPartTextWithTitle,
|
|
2131
2146
|
ChatCompletionContentPartImageWithTitle,
|
|
2147
|
+
ChatCompletionContentPartInputAudioWithTitle,
|
|
2132
2148
|
ChatCompletionContentPartFileWithTitle
|
|
2133
2149
|
]);
|
|
2134
2150
|
var ChatCompletionContentPartText = z6.object({
|
|
@@ -4956,6 +4972,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
4956
4972
|
GENKIT: "genkit",
|
|
4957
4973
|
GITHUB_COPILOT: "github-copilot",
|
|
4958
4974
|
GOOGLE_ADK: "google-adk",
|
|
4975
|
+
GOOGLE_GENERATIVE_AI: "google-generative-ai",
|
|
4959
4976
|
GOOGLE_GENAI: "google-genai",
|
|
4960
4977
|
GROQ: "groq",
|
|
4961
4978
|
HUGGINGFACE: "huggingface",
|
|
@@ -4963,6 +4980,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
4963
4980
|
LANGSMITH: "langsmith",
|
|
4964
4981
|
MASTRA: "mastra",
|
|
4965
4982
|
MISTRAL: "mistral",
|
|
4983
|
+
LANGGRAPH_SDK: "langgraph-sdk",
|
|
4966
4984
|
OLLAMA: "ollama",
|
|
4967
4985
|
OPENAI: "openai",
|
|
4968
4986
|
OPENAI_AGENTS: "openai-agents",
|
|
@@ -4971,12 +4989,13 @@ var INSTRUMENTATION_NAMES = {
|
|
|
4971
4989
|
OPENROUTER_AGENT: "openrouter-agent",
|
|
4972
4990
|
PI_CODING_AGENT: "pi-coding-agent",
|
|
4973
4991
|
STRANDS_AGENT_SDK: "strands-agent-sdk",
|
|
4974
|
-
VOYAGEAI: "voyageai"
|
|
4992
|
+
VOYAGEAI: "voyageai",
|
|
4993
|
+
ELEVENLABS: "elevenlabs"
|
|
4975
4994
|
};
|
|
4976
4995
|
var INTERNAL_SPAN_INSTRUMENTATION_NAME = /* @__PURE__ */ Symbol.for(
|
|
4977
4996
|
"braintrust.spanInstrumentationName"
|
|
4978
4997
|
);
|
|
4979
|
-
var SDK_VERSION = true ? "3.
|
|
4998
|
+
var SDK_VERSION = true ? "3.33.0" : "0.0.0";
|
|
4980
4999
|
function withSpanInstrumentationName(args, instrumentationName) {
|
|
4981
5000
|
return {
|
|
4982
5001
|
...args,
|
|
@@ -8912,10 +8931,16 @@ var SpanImpl = class _SpanImpl {
|
|
|
8912
8931
|
inject(carrier) {
|
|
8913
8932
|
const resolvedCarrier = carrier ?? {};
|
|
8914
8933
|
try {
|
|
8934
|
+
const braintrustParent = this._getOtelParent() ?? this._propagatedState?.braintrustParent;
|
|
8935
|
+
if (!braintrustParent) {
|
|
8936
|
+
debugLogger.forState(this._state).warn(
|
|
8937
|
+
"Injecting trace context without braintrust.parent because the span's destination is not available yet. The receiver will start a new local trace instead of continuing this one."
|
|
8938
|
+
);
|
|
8939
|
+
}
|
|
8915
8940
|
_injectIntoCarrier(resolvedCarrier, {
|
|
8916
8941
|
traceId: this._rootSpanId,
|
|
8917
8942
|
spanId: this._spanId,
|
|
8918
|
-
braintrustParent
|
|
8943
|
+
braintrustParent,
|
|
8919
8944
|
propagatedState: this._propagatedState
|
|
8920
8945
|
});
|
|
8921
8946
|
} catch (e) {
|
|
@@ -9465,6 +9490,16 @@ function renderMessageImpl(render, message, variables) {
|
|
|
9465
9490
|
}
|
|
9466
9491
|
}
|
|
9467
9492
|
];
|
|
9493
|
+
case "input_audio":
|
|
9494
|
+
return [
|
|
9495
|
+
{
|
|
9496
|
+
...c,
|
|
9497
|
+
input_audio: {
|
|
9498
|
+
...c.input_audio,
|
|
9499
|
+
data: render(c.input_audio.data)
|
|
9500
|
+
}
|
|
9501
|
+
}
|
|
9502
|
+
];
|
|
9468
9503
|
case "file":
|
|
9469
9504
|
return [
|
|
9470
9505
|
{
|
|
@@ -10266,8 +10301,8 @@ var harnessAgentChannels = defineChannels(
|
|
|
10266
10301
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
10267
10302
|
var aiSDKConfigs = [
|
|
10268
10303
|
// HarnessAgent turn methods are published only from the package's ESM
|
|
10269
|
-
// `./agent` entrypoint.
|
|
10270
|
-
//
|
|
10304
|
+
// `./agent` entrypoint. Target the class binding so similarly named getters
|
|
10305
|
+
// on stream result classes are not mistaken for agent turn methods.
|
|
10271
10306
|
...[
|
|
10272
10307
|
["createSession", harnessAgentChannels.createSession.channelName],
|
|
10273
10308
|
["generate", harnessAgentChannels.generate.channelName],
|
|
@@ -10282,6 +10317,7 @@ var aiSDKConfigs = [
|
|
|
10282
10317
|
filePath: "dist/agent/index.js"
|
|
10283
10318
|
},
|
|
10284
10319
|
functionQuery: {
|
|
10320
|
+
className: "HarnessAgent",
|
|
10285
10321
|
methodName,
|
|
10286
10322
|
kind: "Async",
|
|
10287
10323
|
index: 0
|
|
@@ -10715,9 +10751,9 @@ var anthropicChannels = defineChannels(
|
|
|
10715
10751
|
// src/auto-instrumentations/configs/anthropic.ts
|
|
10716
10752
|
var anthropicConfigs = [
|
|
10717
10753
|
// Each logical target is listed for both published module formats:
|
|
10718
|
-
// `.mjs` covers ESM imports, while `.js` covers CJS requires.
|
|
10719
|
-
//
|
|
10720
|
-
//
|
|
10754
|
+
// `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
|
|
10755
|
+
// @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
|
|
10756
|
+
// shared Anthropic resources, so they use the same targets and channels.
|
|
10721
10757
|
// Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
|
|
10722
10758
|
{
|
|
10723
10759
|
channelName: anthropicChannels.messagesCreate.channelName,
|
|
@@ -12028,6 +12064,40 @@ var googleADKConfigs = [
|
|
|
12028
12064
|
}
|
|
12029
12065
|
];
|
|
12030
12066
|
|
|
12067
|
+
// src/instrumentation/plugins/google-generative-ai-channels.ts
|
|
12068
|
+
var googleGenerativeAIChannels = defineChannels(
|
|
12069
|
+
"@google/generative-ai",
|
|
12070
|
+
{
|
|
12071
|
+
generateContent: channel({ channelName: "GenerativeModel.generateContent", kind: "async" }),
|
|
12072
|
+
generateContentStream: channel({ channelName: "GenerativeModel.generateContentStream", kind: "async" }),
|
|
12073
|
+
embedContent: channel({ channelName: "GenerativeModel.embedContent", kind: "async" }),
|
|
12074
|
+
batchEmbedContents: channel({ channelName: "GenerativeModel.batchEmbedContents", kind: "async" }),
|
|
12075
|
+
sendMessage: channel({ channelName: "ChatSession.sendMessage", kind: "async" }),
|
|
12076
|
+
sendMessageStream: channel({ channelName: "ChatSession.sendMessageStream", kind: "async" })
|
|
12077
|
+
},
|
|
12078
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENERATIVE_AI }
|
|
12079
|
+
);
|
|
12080
|
+
|
|
12081
|
+
// src/auto-instrumentations/configs/google-generative-ai.ts
|
|
12082
|
+
var googleGenerativeAIConfigs = [
|
|
12083
|
+
"dist/index.js",
|
|
12084
|
+
"dist/index.mjs"
|
|
12085
|
+
].flatMap(
|
|
12086
|
+
(filePath) => Object.entries(googleGenerativeAIChannels).map(([methodName, channel2]) => ({
|
|
12087
|
+
channelName: channel2.channelName,
|
|
12088
|
+
module: {
|
|
12089
|
+
name: "@google/generative-ai",
|
|
12090
|
+
versionRange: ">=0.24.0 <0.25.0",
|
|
12091
|
+
filePath
|
|
12092
|
+
},
|
|
12093
|
+
functionQuery: {
|
|
12094
|
+
className: methodName.startsWith("sendMessage") ? "ChatSession" : "GenerativeModel",
|
|
12095
|
+
methodName,
|
|
12096
|
+
kind: "Async"
|
|
12097
|
+
}
|
|
12098
|
+
}))
|
|
12099
|
+
);
|
|
12100
|
+
|
|
12031
12101
|
// src/instrumentation/plugins/google-genai-channels.ts
|
|
12032
12102
|
var googleGenAIChannels = defineChannels(
|
|
12033
12103
|
"@google/genai",
|
|
@@ -12044,6 +12114,10 @@ var googleGenAIChannels = defineChannels(
|
|
|
12044
12114
|
channelName: "models.embedContent",
|
|
12045
12115
|
kind: "async"
|
|
12046
12116
|
}),
|
|
12117
|
+
httpResponseJson: channel({
|
|
12118
|
+
channelName: "httpResponse.json",
|
|
12119
|
+
kind: "async"
|
|
12120
|
+
}),
|
|
12047
12121
|
interactionsCreate: channel({
|
|
12048
12122
|
channelName: "interactions.create",
|
|
12049
12123
|
kind: "async"
|
|
@@ -12113,6 +12187,21 @@ var googleGenAIConfigs = [
|
|
|
12113
12187
|
kind: "Async"
|
|
12114
12188
|
}
|
|
12115
12189
|
},
|
|
12190
|
+
// The SDK's embedding response converter drops usageMetadata. Observe the
|
|
12191
|
+
// parsed HTTP response before conversion; the plugin scopes this to embeddings.
|
|
12192
|
+
{
|
|
12193
|
+
channelName: googleGenAIChannels.httpResponseJson.channelName,
|
|
12194
|
+
module: {
|
|
12195
|
+
name: "@google/genai",
|
|
12196
|
+
versionRange: ">=1.0.0",
|
|
12197
|
+
filePath: "dist/node/index.mjs"
|
|
12198
|
+
},
|
|
12199
|
+
functionQuery: {
|
|
12200
|
+
className: "HttpResponse",
|
|
12201
|
+
methodName: "json",
|
|
12202
|
+
kind: "Async"
|
|
12203
|
+
}
|
|
12204
|
+
},
|
|
12116
12205
|
// BaseInteractions.create - Interactions API entry point
|
|
12117
12206
|
{
|
|
12118
12207
|
channelName: googleGenAIChannels.interactionsCreate.channelName,
|
|
@@ -12968,6 +13057,42 @@ var mistralConfigs = [
|
|
|
12968
13057
|
}
|
|
12969
13058
|
];
|
|
12970
13059
|
|
|
13060
|
+
// src/instrumentation/plugins/langgraph-sdk-channels.ts
|
|
13061
|
+
var langGraphSDKChannels = defineChannels(
|
|
13062
|
+
"@langchain/langgraph-sdk",
|
|
13063
|
+
{
|
|
13064
|
+
wait: channel({
|
|
13065
|
+
channelName: "runs.wait",
|
|
13066
|
+
kind: "async"
|
|
13067
|
+
}),
|
|
13068
|
+
stream: channel({
|
|
13069
|
+
channelName: "runs.stream",
|
|
13070
|
+
kind: "sync-stream"
|
|
13071
|
+
})
|
|
13072
|
+
},
|
|
13073
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
|
|
13074
|
+
);
|
|
13075
|
+
|
|
13076
|
+
// src/auto-instrumentations/configs/langgraph-sdk.ts
|
|
13077
|
+
var langGraphSDKConfigs = [
|
|
13078
|
+
"js",
|
|
13079
|
+
"cjs"
|
|
13080
|
+
].flatMap(
|
|
13081
|
+
(extension) => ["wait", "stream"].map((methodName) => ({
|
|
13082
|
+
channelName: langGraphSDKChannels[methodName].channelName,
|
|
13083
|
+
module: {
|
|
13084
|
+
name: "@langchain/langgraph-sdk",
|
|
13085
|
+
versionRange: ">=1.9.25 <2.0.0",
|
|
13086
|
+
filePath: `dist/client/runs/index.${extension}`
|
|
13087
|
+
},
|
|
13088
|
+
functionQuery: {
|
|
13089
|
+
className: "RunsClient",
|
|
13090
|
+
methodName,
|
|
13091
|
+
kind: methodName === "stream" ? "Sync" : "Async"
|
|
13092
|
+
}
|
|
13093
|
+
}))
|
|
13094
|
+
);
|
|
13095
|
+
|
|
12971
13096
|
// src/instrumentation/plugins/ollama-channels.ts
|
|
12972
13097
|
var ollamaChannels = defineChannels(
|
|
12973
13098
|
"ollama",
|
|
@@ -13066,6 +13191,18 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
|
|
|
13066
13191
|
var openAIChannels = defineChannels(
|
|
13067
13192
|
"openai",
|
|
13068
13193
|
{
|
|
13194
|
+
agentsTraceStart: channel({
|
|
13195
|
+
channelName: "agents.trace.start",
|
|
13196
|
+
kind: "async"
|
|
13197
|
+
}),
|
|
13198
|
+
agentsTraceCapture: channel({
|
|
13199
|
+
channelName: "agents.trace.capture",
|
|
13200
|
+
kind: "async"
|
|
13201
|
+
}),
|
|
13202
|
+
agentsTraceFail: channel({
|
|
13203
|
+
channelName: "agents.trace.fail",
|
|
13204
|
+
kind: "async"
|
|
13205
|
+
}),
|
|
13069
13206
|
filesCreateTraced: channel({
|
|
13070
13207
|
channelName: "files.create-traced",
|
|
13071
13208
|
kind: "async"
|
|
@@ -13592,6 +13729,60 @@ var strandsAgentSDKConfigs = [
|
|
|
13592
13729
|
}
|
|
13593
13730
|
];
|
|
13594
13731
|
|
|
13732
|
+
// src/instrumentation/plugins/elevenlabs-channels.ts
|
|
13733
|
+
var elevenLabsChannels = defineChannels(
|
|
13734
|
+
"@elevenlabs/elevenlabs-js",
|
|
13735
|
+
{
|
|
13736
|
+
convert: channel({
|
|
13737
|
+
channelName: "textToSpeech.convert",
|
|
13738
|
+
kind: "async"
|
|
13739
|
+
}),
|
|
13740
|
+
stream: channel({
|
|
13741
|
+
channelName: "textToSpeech.stream",
|
|
13742
|
+
kind: "async"
|
|
13743
|
+
}),
|
|
13744
|
+
convertWithTimestamps: channel({ channelName: "textToSpeech.convertWithTimestamps", kind: "async" }),
|
|
13745
|
+
streamWithTimestamps: channel({ channelName: "textToSpeech.streamWithTimestamps", kind: "async" }),
|
|
13746
|
+
transcribe: channel({ channelName: "speechToText.convert", kind: "async" })
|
|
13747
|
+
},
|
|
13748
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.ELEVENLABS }
|
|
13749
|
+
);
|
|
13750
|
+
|
|
13751
|
+
// src/auto-instrumentations/configs/elevenlabs.ts
|
|
13752
|
+
var elevenLabsConfigs = [
|
|
13753
|
+
...[
|
|
13754
|
+
"convert",
|
|
13755
|
+
"stream",
|
|
13756
|
+
"convertWithTimestamps",
|
|
13757
|
+
"streamWithTimestamps"
|
|
13758
|
+
].map((methodName) => ({
|
|
13759
|
+
channelName: elevenLabsChannels[methodName].channelName,
|
|
13760
|
+
module: {
|
|
13761
|
+
name: "@elevenlabs/elevenlabs-js",
|
|
13762
|
+
versionRange: ">=2.67.0 <3.0.0",
|
|
13763
|
+
filePath: "api/resources/textToSpeech/client/Client.js"
|
|
13764
|
+
},
|
|
13765
|
+
functionQuery: {
|
|
13766
|
+
className: "TextToSpeechClient",
|
|
13767
|
+
methodName,
|
|
13768
|
+
kind: "Async"
|
|
13769
|
+
}
|
|
13770
|
+
})),
|
|
13771
|
+
{
|
|
13772
|
+
channelName: elevenLabsChannels.transcribe.channelName,
|
|
13773
|
+
module: {
|
|
13774
|
+
name: "@elevenlabs/elevenlabs-js",
|
|
13775
|
+
versionRange: ">=2.67.0 <3.0.0",
|
|
13776
|
+
filePath: "api/resources/speechToText/client/Client.js"
|
|
13777
|
+
},
|
|
13778
|
+
functionQuery: {
|
|
13779
|
+
className: "SpeechToTextClient",
|
|
13780
|
+
methodName: "convert",
|
|
13781
|
+
kind: "Async"
|
|
13782
|
+
}
|
|
13783
|
+
}
|
|
13784
|
+
];
|
|
13785
|
+
|
|
13595
13786
|
// src/instrumentation/plugins/voyageai-channels.ts
|
|
13596
13787
|
var voyageAIChannels = defineChannels(
|
|
13597
13788
|
"voyageai",
|
|
@@ -13700,6 +13891,10 @@ var defaultInstrumentationConfigGroups = [
|
|
|
13700
13891
|
integrations: ["openAIAgents"],
|
|
13701
13892
|
configs: openAIAgentsCoreConfigs
|
|
13702
13893
|
},
|
|
13894
|
+
{
|
|
13895
|
+
integrations: ["googleGenerativeAI"],
|
|
13896
|
+
configs: googleGenerativeAIConfigs
|
|
13897
|
+
},
|
|
13703
13898
|
{
|
|
13704
13899
|
integrations: ["google", "googleGenAI"],
|
|
13705
13900
|
configs: googleGenAIConfigs
|
|
@@ -13719,6 +13914,7 @@ var defaultInstrumentationConfigGroups = [
|
|
|
13719
13914
|
configs: openRouterAgentConfigs
|
|
13720
13915
|
},
|
|
13721
13916
|
{ integrations: ["mistral"], configs: mistralConfigs },
|
|
13917
|
+
{ integrations: ["langgraphSDK"], configs: langGraphSDKConfigs },
|
|
13722
13918
|
{ integrations: ["ollama"], configs: ollamaConfigs },
|
|
13723
13919
|
{ integrations: ["googleADK"], configs: googleADKConfigs },
|
|
13724
13920
|
{ integrations: ["cohere"], configs: cohereConfigs },
|
|
@@ -13743,6 +13939,10 @@ var defaultInstrumentationConfigGroups = [
|
|
|
13743
13939
|
integrations: ["flue"],
|
|
13744
13940
|
configs: flueConfigs
|
|
13745
13941
|
},
|
|
13942
|
+
{
|
|
13943
|
+
integrations: ["elevenlabs"],
|
|
13944
|
+
configs: elevenLabsConfigs
|
|
13945
|
+
},
|
|
13746
13946
|
{
|
|
13747
13947
|
integrations: ["voyageai"],
|
|
13748
13948
|
configs: voyageAIConfigs
|
|
@@ -33,8 +33,10 @@ __export(index_exports, {
|
|
|
33
33
|
gitHubCopilotConfigs: () => gitHubCopilotConfigs,
|
|
34
34
|
googleADKConfigs: () => googleADKConfigs,
|
|
35
35
|
googleGenAIConfigs: () => googleGenAIConfigs,
|
|
36
|
+
googleGenerativeAIConfigs: () => googleGenerativeAIConfigs,
|
|
36
37
|
groqConfigs: () => groqConfigs,
|
|
37
38
|
huggingFaceConfigs: () => huggingFaceConfigs,
|
|
39
|
+
langGraphSDKConfigs: () => langGraphSDKConfigs,
|
|
38
40
|
langSmithConfigs: () => langSmithConfigs,
|
|
39
41
|
langchainConfigs: () => langchainConfigs,
|
|
40
42
|
mistralConfigs: () => mistralConfigs,
|
|
@@ -807,6 +809,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
807
809
|
GENKIT: "genkit",
|
|
808
810
|
GITHUB_COPILOT: "github-copilot",
|
|
809
811
|
GOOGLE_ADK: "google-adk",
|
|
812
|
+
GOOGLE_GENERATIVE_AI: "google-generative-ai",
|
|
810
813
|
GOOGLE_GENAI: "google-genai",
|
|
811
814
|
GROQ: "groq",
|
|
812
815
|
HUGGINGFACE: "huggingface",
|
|
@@ -814,6 +817,7 @@ var INSTRUMENTATION_NAMES = {
|
|
|
814
817
|
LANGSMITH: "langsmith",
|
|
815
818
|
MASTRA: "mastra",
|
|
816
819
|
MISTRAL: "mistral",
|
|
820
|
+
LANGGRAPH_SDK: "langgraph-sdk",
|
|
817
821
|
OLLAMA: "ollama",
|
|
818
822
|
OPENAI: "openai",
|
|
819
823
|
OPENAI_AGENTS: "openai-agents",
|
|
@@ -822,13 +826,26 @@ var INSTRUMENTATION_NAMES = {
|
|
|
822
826
|
OPENROUTER_AGENT: "openrouter-agent",
|
|
823
827
|
PI_CODING_AGENT: "pi-coding-agent",
|
|
824
828
|
STRANDS_AGENT_SDK: "strands-agent-sdk",
|
|
825
|
-
VOYAGEAI: "voyageai"
|
|
829
|
+
VOYAGEAI: "voyageai",
|
|
830
|
+
ELEVENLABS: "elevenlabs"
|
|
826
831
|
};
|
|
827
832
|
|
|
828
833
|
// src/instrumentation/plugins/openai-channels.ts
|
|
829
834
|
var openAIChannels = defineChannels(
|
|
830
835
|
"openai",
|
|
831
836
|
{
|
|
837
|
+
agentsTraceStart: channel({
|
|
838
|
+
channelName: "agents.trace.start",
|
|
839
|
+
kind: "async"
|
|
840
|
+
}),
|
|
841
|
+
agentsTraceCapture: channel({
|
|
842
|
+
channelName: "agents.trace.capture",
|
|
843
|
+
kind: "async"
|
|
844
|
+
}),
|
|
845
|
+
agentsTraceFail: channel({
|
|
846
|
+
channelName: "agents.trace.fail",
|
|
847
|
+
kind: "async"
|
|
848
|
+
}),
|
|
832
849
|
filesCreateTraced: channel({
|
|
833
850
|
channelName: "files.create-traced",
|
|
834
851
|
kind: "async"
|
|
@@ -1138,9 +1155,9 @@ var anthropicChannels = defineChannels(
|
|
|
1138
1155
|
// src/auto-instrumentations/configs/anthropic.ts
|
|
1139
1156
|
var anthropicConfigs = [
|
|
1140
1157
|
// Each logical target is listed for both published module formats:
|
|
1141
|
-
// `.mjs` covers ESM imports, while `.js` covers CJS requires.
|
|
1142
|
-
//
|
|
1143
|
-
//
|
|
1158
|
+
// `.mjs` covers ESM imports, while `.js` covers CJS requires. Both
|
|
1159
|
+
// @anthropic-ai/bedrock-sdk and @anthropic-ai/vertex-sdk instantiate these
|
|
1160
|
+
// shared Anthropic resources, so they use the same targets and channels.
|
|
1144
1161
|
// Messages API - create in older SDK layouts (supports streaming via stream=true parameter)
|
|
1145
1162
|
{
|
|
1146
1163
|
channelName: anthropicChannels.messagesCreate.channelName,
|
|
@@ -1472,8 +1489,8 @@ var harnessAgentChannels = defineChannels(
|
|
|
1472
1489
|
// src/auto-instrumentations/configs/ai-sdk.ts
|
|
1473
1490
|
var aiSDKConfigs = [
|
|
1474
1491
|
// HarnessAgent turn methods are published only from the package's ESM
|
|
1475
|
-
// `./agent` entrypoint.
|
|
1476
|
-
//
|
|
1492
|
+
// `./agent` entrypoint. Target the class binding so similarly named getters
|
|
1493
|
+
// on stream result classes are not mistaken for agent turn methods.
|
|
1477
1494
|
...[
|
|
1478
1495
|
["createSession", harnessAgentChannels.createSession.channelName],
|
|
1479
1496
|
["generate", harnessAgentChannels.generate.channelName],
|
|
@@ -1488,6 +1505,7 @@ var aiSDKConfigs = [
|
|
|
1488
1505
|
filePath: "dist/agent/index.js"
|
|
1489
1506
|
},
|
|
1490
1507
|
functionQuery: {
|
|
1508
|
+
className: "HarnessAgent",
|
|
1491
1509
|
methodName,
|
|
1492
1510
|
kind: "Async",
|
|
1493
1511
|
index: 0
|
|
@@ -2111,6 +2129,40 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
|
|
|
2111
2129
|
)
|
|
2112
2130
|
);
|
|
2113
2131
|
|
|
2132
|
+
// src/instrumentation/plugins/google-generative-ai-channels.ts
|
|
2133
|
+
var googleGenerativeAIChannels = defineChannels(
|
|
2134
|
+
"@google/generative-ai",
|
|
2135
|
+
{
|
|
2136
|
+
generateContent: channel({ channelName: "GenerativeModel.generateContent", kind: "async" }),
|
|
2137
|
+
generateContentStream: channel({ channelName: "GenerativeModel.generateContentStream", kind: "async" }),
|
|
2138
|
+
embedContent: channel({ channelName: "GenerativeModel.embedContent", kind: "async" }),
|
|
2139
|
+
batchEmbedContents: channel({ channelName: "GenerativeModel.batchEmbedContents", kind: "async" }),
|
|
2140
|
+
sendMessage: channel({ channelName: "ChatSession.sendMessage", kind: "async" }),
|
|
2141
|
+
sendMessageStream: channel({ channelName: "ChatSession.sendMessageStream", kind: "async" })
|
|
2142
|
+
},
|
|
2143
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENERATIVE_AI }
|
|
2144
|
+
);
|
|
2145
|
+
|
|
2146
|
+
// src/auto-instrumentations/configs/google-generative-ai.ts
|
|
2147
|
+
var googleGenerativeAIConfigs = [
|
|
2148
|
+
"dist/index.js",
|
|
2149
|
+
"dist/index.mjs"
|
|
2150
|
+
].flatMap(
|
|
2151
|
+
(filePath) => Object.entries(googleGenerativeAIChannels).map(([methodName, channel2]) => ({
|
|
2152
|
+
channelName: channel2.channelName,
|
|
2153
|
+
module: {
|
|
2154
|
+
name: "@google/generative-ai",
|
|
2155
|
+
versionRange: ">=0.24.0 <0.25.0",
|
|
2156
|
+
filePath
|
|
2157
|
+
},
|
|
2158
|
+
functionQuery: {
|
|
2159
|
+
className: methodName.startsWith("sendMessage") ? "ChatSession" : "GenerativeModel",
|
|
2160
|
+
methodName,
|
|
2161
|
+
kind: "Async"
|
|
2162
|
+
}
|
|
2163
|
+
}))
|
|
2164
|
+
);
|
|
2165
|
+
|
|
2114
2166
|
// src/instrumentation/plugins/google-genai-channels.ts
|
|
2115
2167
|
var googleGenAIChannels = defineChannels(
|
|
2116
2168
|
"@google/genai",
|
|
@@ -2127,6 +2179,10 @@ var googleGenAIChannels = defineChannels(
|
|
|
2127
2179
|
channelName: "models.embedContent",
|
|
2128
2180
|
kind: "async"
|
|
2129
2181
|
}),
|
|
2182
|
+
httpResponseJson: channel({
|
|
2183
|
+
channelName: "httpResponse.json",
|
|
2184
|
+
kind: "async"
|
|
2185
|
+
}),
|
|
2130
2186
|
interactionsCreate: channel({
|
|
2131
2187
|
channelName: "interactions.create",
|
|
2132
2188
|
kind: "async"
|
|
@@ -2196,6 +2252,21 @@ var googleGenAIConfigs = [
|
|
|
2196
2252
|
kind: "Async"
|
|
2197
2253
|
}
|
|
2198
2254
|
},
|
|
2255
|
+
// The SDK's embedding response converter drops usageMetadata. Observe the
|
|
2256
|
+
// parsed HTTP response before conversion; the plugin scopes this to embeddings.
|
|
2257
|
+
{
|
|
2258
|
+
channelName: googleGenAIChannels.httpResponseJson.channelName,
|
|
2259
|
+
module: {
|
|
2260
|
+
name: "@google/genai",
|
|
2261
|
+
versionRange: ">=1.0.0",
|
|
2262
|
+
filePath: "dist/node/index.mjs"
|
|
2263
|
+
},
|
|
2264
|
+
functionQuery: {
|
|
2265
|
+
className: "HttpResponse",
|
|
2266
|
+
methodName: "json",
|
|
2267
|
+
kind: "Async"
|
|
2268
|
+
}
|
|
2269
|
+
},
|
|
2199
2270
|
// BaseInteractions.create - Interactions API entry point
|
|
2200
2271
|
{
|
|
2201
2272
|
channelName: googleGenAIChannels.interactionsCreate.channelName,
|
|
@@ -2980,6 +3051,42 @@ var mistralConfigs = [
|
|
|
2980
3051
|
}
|
|
2981
3052
|
];
|
|
2982
3053
|
|
|
3054
|
+
// src/instrumentation/plugins/langgraph-sdk-channels.ts
|
|
3055
|
+
var langGraphSDKChannels = defineChannels(
|
|
3056
|
+
"@langchain/langgraph-sdk",
|
|
3057
|
+
{
|
|
3058
|
+
wait: channel({
|
|
3059
|
+
channelName: "runs.wait",
|
|
3060
|
+
kind: "async"
|
|
3061
|
+
}),
|
|
3062
|
+
stream: channel({
|
|
3063
|
+
channelName: "runs.stream",
|
|
3064
|
+
kind: "sync-stream"
|
|
3065
|
+
})
|
|
3066
|
+
},
|
|
3067
|
+
{ instrumentationName: INSTRUMENTATION_NAMES.LANGGRAPH_SDK }
|
|
3068
|
+
);
|
|
3069
|
+
|
|
3070
|
+
// src/auto-instrumentations/configs/langgraph-sdk.ts
|
|
3071
|
+
var langGraphSDKConfigs = [
|
|
3072
|
+
"js",
|
|
3073
|
+
"cjs"
|
|
3074
|
+
].flatMap(
|
|
3075
|
+
(extension) => ["wait", "stream"].map((methodName) => ({
|
|
3076
|
+
channelName: langGraphSDKChannels[methodName].channelName,
|
|
3077
|
+
module: {
|
|
3078
|
+
name: "@langchain/langgraph-sdk",
|
|
3079
|
+
versionRange: ">=1.9.25 <2.0.0",
|
|
3080
|
+
filePath: `dist/client/runs/index.${extension}`
|
|
3081
|
+
},
|
|
3082
|
+
functionQuery: {
|
|
3083
|
+
className: "RunsClient",
|
|
3084
|
+
methodName,
|
|
3085
|
+
kind: methodName === "stream" ? "Sync" : "Async"
|
|
3086
|
+
}
|
|
3087
|
+
}))
|
|
3088
|
+
);
|
|
3089
|
+
|
|
2983
3090
|
// src/instrumentation/plugins/ollama-channels.ts
|
|
2984
3091
|
var ollamaChannels = defineChannels(
|
|
2985
3092
|
"ollama",
|
|
@@ -4100,8 +4207,10 @@ var piCodingAgentConfigs = [
|
|
|
4100
4207
|
gitHubCopilotConfigs,
|
|
4101
4208
|
googleADKConfigs,
|
|
4102
4209
|
googleGenAIConfigs,
|
|
4210
|
+
googleGenerativeAIConfigs,
|
|
4103
4211
|
groqConfigs,
|
|
4104
4212
|
huggingFaceConfigs,
|
|
4213
|
+
langGraphSDKConfigs,
|
|
4105
4214
|
langSmithConfigs,
|
|
4106
4215
|
langchainConfigs,
|
|
4107
4216
|
mistralConfigs,
|
|
@@ -64,6 +64,8 @@ declare const cursorSDKConfigs: InstrumentationConfig[];
|
|
|
64
64
|
|
|
65
65
|
declare const openAIAgentsCoreConfigs: InstrumentationConfig[];
|
|
66
66
|
|
|
67
|
+
declare const googleGenerativeAIConfigs: InstrumentationConfig[];
|
|
68
|
+
|
|
67
69
|
/**
|
|
68
70
|
* Instrumentation configurations for the Google GenAI SDK.
|
|
69
71
|
*
|
|
@@ -85,6 +87,8 @@ declare const openRouterConfigs: InstrumentationConfig[];
|
|
|
85
87
|
|
|
86
88
|
declare const mistralConfigs: InstrumentationConfig[];
|
|
87
89
|
|
|
90
|
+
declare const langGraphSDKConfigs: InstrumentationConfig[];
|
|
91
|
+
|
|
88
92
|
declare const ollamaConfigs: InstrumentationConfig[];
|
|
89
93
|
|
|
90
94
|
/**
|
|
@@ -123,4 +127,4 @@ declare const langSmithConfigs: InstrumentationConfig[];
|
|
|
123
127
|
|
|
124
128
|
declare const piCodingAgentConfigs: InstrumentationConfig[];
|
|
125
129
|
|
|
126
|
-
export { InstrumentationConfig, aiSDKConfigs, anthropicConfigs, bedrockRuntimeConfigs, claudeAgentSDKConfigs, cloudflareAIChatConfigs, cloudflareAgentsConfigs, cloudflareThinkConfigs, cohereConfigs, cursorSDKConfigs, genkitConfigs, gitHubCopilotConfigs, googleADKConfigs, googleGenAIConfigs, groqConfigs, huggingFaceConfigs, langSmithConfigs, langchainConfigs, mistralConfigs, ollamaConfigs, openAIAgentsCoreConfigs, openAICodexConfigs, openRouterAgentConfigs, openRouterConfigs, openaiConfigs, piCodingAgentConfigs };
|
|
130
|
+
export { InstrumentationConfig, aiSDKConfigs, anthropicConfigs, bedrockRuntimeConfigs, claudeAgentSDKConfigs, cloudflareAIChatConfigs, cloudflareAgentsConfigs, cloudflareThinkConfigs, cohereConfigs, cursorSDKConfigs, genkitConfigs, gitHubCopilotConfigs, googleADKConfigs, googleGenAIConfigs, googleGenerativeAIConfigs, groqConfigs, huggingFaceConfigs, langGraphSDKConfigs, langSmithConfigs, langchainConfigs, mistralConfigs, ollamaConfigs, openAIAgentsCoreConfigs, openAICodexConfigs, openRouterAgentConfigs, openRouterConfigs, openaiConfigs, piCodingAgentConfigs };
|
|
@@ -64,6 +64,8 @@ declare const cursorSDKConfigs: InstrumentationConfig[];
|
|
|
64
64
|
|
|
65
65
|
declare const openAIAgentsCoreConfigs: InstrumentationConfig[];
|
|
66
66
|
|
|
67
|
+
declare const googleGenerativeAIConfigs: InstrumentationConfig[];
|
|
68
|
+
|
|
67
69
|
/**
|
|
68
70
|
* Instrumentation configurations for the Google GenAI SDK.
|
|
69
71
|
*
|
|
@@ -85,6 +87,8 @@ declare const openRouterConfigs: InstrumentationConfig[];
|
|
|
85
87
|
|
|
86
88
|
declare const mistralConfigs: InstrumentationConfig[];
|
|
87
89
|
|
|
90
|
+
declare const langGraphSDKConfigs: InstrumentationConfig[];
|
|
91
|
+
|
|
88
92
|
declare const ollamaConfigs: InstrumentationConfig[];
|
|
89
93
|
|
|
90
94
|
/**
|
|
@@ -123,4 +127,4 @@ declare const langSmithConfigs: InstrumentationConfig[];
|
|
|
123
127
|
|
|
124
128
|
declare const piCodingAgentConfigs: InstrumentationConfig[];
|
|
125
129
|
|
|
126
|
-
export { InstrumentationConfig, aiSDKConfigs, anthropicConfigs, bedrockRuntimeConfigs, claudeAgentSDKConfigs, cloudflareAIChatConfigs, cloudflareAgentsConfigs, cloudflareThinkConfigs, cohereConfigs, cursorSDKConfigs, genkitConfigs, gitHubCopilotConfigs, googleADKConfigs, googleGenAIConfigs, groqConfigs, huggingFaceConfigs, langSmithConfigs, langchainConfigs, mistralConfigs, ollamaConfigs, openAIAgentsCoreConfigs, openAICodexConfigs, openRouterAgentConfigs, openRouterConfigs, openaiConfigs, piCodingAgentConfigs };
|
|
130
|
+
export { InstrumentationConfig, aiSDKConfigs, anthropicConfigs, bedrockRuntimeConfigs, claudeAgentSDKConfigs, cloudflareAIChatConfigs, cloudflareAgentsConfigs, cloudflareThinkConfigs, cohereConfigs, cursorSDKConfigs, genkitConfigs, gitHubCopilotConfigs, googleADKConfigs, googleGenAIConfigs, googleGenerativeAIConfigs, groqConfigs, huggingFaceConfigs, langGraphSDKConfigs, langSmithConfigs, langchainConfigs, mistralConfigs, ollamaConfigs, openAIAgentsCoreConfigs, openAICodexConfigs, openRouterAgentConfigs, openRouterConfigs, openaiConfigs, piCodingAgentConfigs };
|
|
@@ -12,8 +12,10 @@ import {
|
|
|
12
12
|
gitHubCopilotConfigs,
|
|
13
13
|
googleADKConfigs,
|
|
14
14
|
googleGenAIConfigs,
|
|
15
|
+
googleGenerativeAIConfigs,
|
|
15
16
|
groqConfigs,
|
|
16
17
|
huggingFaceConfigs,
|
|
18
|
+
langGraphSDKConfigs,
|
|
17
19
|
langSmithConfigs,
|
|
18
20
|
langchainConfigs,
|
|
19
21
|
mistralConfigs,
|
|
@@ -24,7 +26,7 @@ import {
|
|
|
24
26
|
openRouterConfigs,
|
|
25
27
|
openaiConfigs,
|
|
26
28
|
piCodingAgentConfigs
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-T2DMPWFI.mjs";
|
|
28
30
|
import "./chunk-JPUFNW7X.mjs";
|
|
29
31
|
export {
|
|
30
32
|
aiSDKConfigs,
|
|
@@ -40,8 +42,10 @@ export {
|
|
|
40
42
|
gitHubCopilotConfigs,
|
|
41
43
|
googleADKConfigs,
|
|
42
44
|
googleGenAIConfigs,
|
|
45
|
+
googleGenerativeAIConfigs,
|
|
43
46
|
groqConfigs,
|
|
44
47
|
huggingFaceConfigs,
|
|
48
|
+
langGraphSDKConfigs,
|
|
45
49
|
langSmithConfigs,
|
|
46
50
|
langchainConfigs,
|
|
47
51
|
mistralConfigs,
|