braintrust 3.23.1 → 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dev/dist/index.d.mts +11 -0
  2. package/dev/dist/index.d.ts +11 -0
  3. package/dev/dist/index.js +2881 -1518
  4. package/dev/dist/index.mjs +2298 -935
  5. package/dist/apply-auto-instrumentation.js +218 -195
  6. package/dist/apply-auto-instrumentation.mjs +30 -7
  7. package/dist/auto-instrumentations/bundler/esbuild.cjs +618 -444
  8. package/dist/auto-instrumentations/bundler/esbuild.mjs +2 -2
  9. package/dist/auto-instrumentations/bundler/next.cjs +618 -444
  10. package/dist/auto-instrumentations/bundler/next.mjs +3 -3
  11. package/dist/auto-instrumentations/bundler/rollup.cjs +618 -444
  12. package/dist/auto-instrumentations/bundler/rollup.mjs +2 -2
  13. package/dist/auto-instrumentations/bundler/vite.cjs +618 -444
  14. package/dist/auto-instrumentations/bundler/vite.d.mts +1 -1
  15. package/dist/auto-instrumentations/bundler/vite.d.ts +1 -1
  16. package/dist/auto-instrumentations/bundler/vite.mjs +2 -2
  17. package/dist/auto-instrumentations/bundler/webpack-loader.cjs +618 -444
  18. package/dist/auto-instrumentations/bundler/webpack.cjs +618 -444
  19. package/dist/auto-instrumentations/bundler/webpack.mjs +3 -3
  20. package/dist/auto-instrumentations/{chunk-KIMLYPRW.mjs → chunk-7P6563SW.mjs} +1 -1
  21. package/dist/auto-instrumentations/{chunk-YXLNSAMJ.mjs → chunk-CZ24KNHT.mjs} +591 -424
  22. package/dist/auto-instrumentations/{chunk-EXY7QCJD.mjs → chunk-JPVCUKTY.mjs} +30 -21
  23. package/dist/auto-instrumentations/hook.mjs +778 -457
  24. package/dist/auto-instrumentations/index.cjs +590 -424
  25. package/dist/auto-instrumentations/index.mjs +1 -1
  26. package/dist/browser.d.mts +138 -9
  27. package/dist/browser.d.ts +138 -9
  28. package/dist/browser.js +2700 -1011
  29. package/dist/browser.mjs +2700 -1011
  30. package/dist/{chunk-RBXD2KYN.mjs → chunk-2SANLSWX.mjs} +1577 -513
  31. package/dist/{chunk-36IPYKMG.mjs → chunk-ABR2QWDP.mjs} +704 -438
  32. package/dist/{chunk-B6ZQIAK3.js → chunk-GSIDVFE6.js} +2361 -1297
  33. package/dist/{chunk-CDIKAHDZ.js → chunk-P25IOOU4.js} +706 -440
  34. package/dist/cli.js +2307 -940
  35. package/dist/edge-light.js +2700 -1011
  36. package/dist/edge-light.mjs +2700 -1011
  37. package/dist/index.d.mts +138 -9
  38. package/dist/index.d.ts +138 -9
  39. package/dist/index.js +955 -551
  40. package/dist/index.mjs +493 -89
  41. package/dist/instrumentation/index.d.mts +135 -9
  42. package/dist/instrumentation/index.d.ts +135 -9
  43. package/dist/instrumentation/index.js +2554 -1009
  44. package/dist/instrumentation/index.mjs +2554 -1009
  45. package/dist/vitest-evals-reporter.js +17 -16
  46. package/dist/vitest-evals-reporter.mjs +3 -2
  47. package/dist/workerd.js +2700 -1011
  48. package/dist/workerd.mjs +2700 -1011
  49. package/package.json +4 -4
  50. package/util/dist/index.js +4 -0
  51. package/util/dist/index.mjs +4 -0
@@ -107,6 +107,7 @@ var DefaultChannel = class {
107
107
  constructor(name) {
108
108
  this.name = name;
109
109
  }
110
+ name;
110
111
  hasSubscribers = false;
111
112
  subscribe(_subscription) {
112
113
  }
@@ -1159,6 +1160,7 @@ var SpanComponentsV3 = class _SpanComponentsV3 {
1159
1160
  constructor(data) {
1160
1161
  this.data = data;
1161
1162
  }
1163
+ data;
1162
1164
  toStr() {
1163
1165
  const jsonObj = {
1164
1166
  compute_object_metadata_args: this.data.compute_object_metadata_args || void 0,
@@ -1576,6 +1578,7 @@ var SpanComponentsV4 = class _SpanComponentsV4 {
1576
1578
  constructor(data) {
1577
1579
  this.data = data;
1578
1580
  }
1581
+ data;
1579
1582
  toStr() {
1580
1583
  const jsonObj = {
1581
1584
  compute_object_metadata_args: this.data.compute_object_metadata_args || void 0,
@@ -4728,6 +4731,144 @@ var SpanCache = class {
4728
4731
  }
4729
4732
  };
4730
4733
 
4734
+ // src/span-origin.ts
4735
+ var INSTRUMENTATION_NAMES = {
4736
+ AI_SDK: "ai-sdk",
4737
+ ANTHROPIC: "anthropic",
4738
+ BEDROCK_RUNTIME: "bedrock-runtime",
4739
+ BRAINTRUST_JS_LOGGER: "braintrust-js-logger",
4740
+ CLAUDE_AGENT_SDK: "claude-agent-sdk",
4741
+ COHERE: "cohere",
4742
+ CURSOR_SDK: "cursor-sdk",
4743
+ EVE: "eve",
4744
+ FLUE: "flue",
4745
+ GENKIT: "genkit",
4746
+ GITHUB_COPILOT: "github-copilot",
4747
+ GOOGLE_ADK: "google-adk",
4748
+ GOOGLE_GENAI: "google-genai",
4749
+ GROQ: "groq",
4750
+ HUGGINGFACE: "huggingface",
4751
+ LANGCHAIN: "langchain",
4752
+ LANGSMITH: "langsmith",
4753
+ MASTRA: "mastra",
4754
+ MISTRAL: "mistral",
4755
+ OPENAI: "openai",
4756
+ OPENAI_AGENTS: "openai-agents",
4757
+ OPENAI_CODEX: "openai-codex",
4758
+ OPENROUTER: "openrouter",
4759
+ OPENROUTER_AGENT: "openrouter-agent",
4760
+ PI_CODING_AGENT: "pi-coding-agent",
4761
+ STRANDS_AGENT_SDK: "strands-agent-sdk"
4762
+ };
4763
+ var INTERNAL_SPAN_INSTRUMENTATION_NAME = /* @__PURE__ */ Symbol.for(
4764
+ "braintrust.spanInstrumentationName"
4765
+ );
4766
+ var SDK_VERSION = true ? "3.25.0" : "0.0.0";
4767
+ function withSpanInstrumentationName(args, instrumentationName) {
4768
+ return {
4769
+ ...args,
4770
+ [INTERNAL_SPAN_INSTRUMENTATION_NAME]: instrumentationName
4771
+ };
4772
+ }
4773
+ function getSpanInstrumentationName(args) {
4774
+ if (typeof args !== "object" || args === null) {
4775
+ return void 0;
4776
+ }
4777
+ const value = args[INTERNAL_SPAN_INSTRUMENTATION_NAME];
4778
+ return isSpanInstrumentationName(value) ? value : void 0;
4779
+ }
4780
+ function detectSpanOriginEnvironment(explicit) {
4781
+ if (explicit) return explicit;
4782
+ const envType = isomorph_default.getEnv("BRAINTRUST_ENVIRONMENT_TYPE");
4783
+ const envName = isomorph_default.getEnv("BRAINTRUST_ENVIRONMENT_NAME");
4784
+ if (envType || envName) {
4785
+ return {
4786
+ ...envType ? { type: envType } : {},
4787
+ ...envName ? { name: envName } : {}
4788
+ };
4789
+ }
4790
+ const ci = firstPresent([
4791
+ ["GITHUB_ACTIONS", "github_actions"],
4792
+ ["GITLAB_CI", "gitlab_ci"],
4793
+ ["CIRCLECI", "circleci"],
4794
+ ["BUILDKITE", "buildkite"],
4795
+ ["JENKINS_URL", "jenkins"],
4796
+ ["JENKINS_HOME", "jenkins"],
4797
+ ["TF_BUILD", "azure_pipelines"],
4798
+ ["TEAMCITY_VERSION", "teamcity"],
4799
+ ["TRAVIS", "travis"],
4800
+ ["BITBUCKET_BUILD_NUMBER", "bitbucket"]
4801
+ ]);
4802
+ if (ci) return { type: "ci", name: ci };
4803
+ if (isomorph_default.getEnv("CI")) return { type: "ci", name: "ci" };
4804
+ const earlyServer = firstPresent([
4805
+ ["VERCEL", "vercel"],
4806
+ ["NETLIFY", "netlify"]
4807
+ ]);
4808
+ if (earlyServer) return { type: "server", name: earlyServer };
4809
+ if (isomorph_default.getEnv("ECS_CONTAINER_METADATA_URI") || isomorph_default.getEnv("ECS_CONTAINER_METADATA_URI_V4")) {
4810
+ return { type: "server", name: "ecs" };
4811
+ }
4812
+ const awsExecutionEnv = isomorph_default.getEnv("AWS_EXECUTION_ENV");
4813
+ if (awsExecutionEnv?.startsWith("AWS_ECS_")) {
4814
+ return { type: "server", name: "ecs" };
4815
+ }
4816
+ if (awsExecutionEnv?.startsWith("AWS_Lambda_")) {
4817
+ return { type: "server", name: "aws_lambda" };
4818
+ }
4819
+ if (isomorph_default.getEnv("AWS_LAMBDA_FUNCTION_NAME")) {
4820
+ return { type: "server", name: "aws_lambda" };
4821
+ }
4822
+ const server = firstPresent([
4823
+ ["K_SERVICE", "cloud_run"],
4824
+ ["FUNCTION_TARGET", "gcp_functions"],
4825
+ ["KUBERNETES_SERVICE_HOST", "kubernetes"],
4826
+ ["DYNO", "heroku"],
4827
+ ["FLY_APP_NAME", "fly"],
4828
+ ["RAILWAY_ENVIRONMENT", "railway"],
4829
+ ["RENDER_SERVICE_NAME", "render"]
4830
+ ]);
4831
+ if (server) return { type: "server", name: server };
4832
+ return deploymentModeEnvironment("NODE_ENV", isomorph_default.getEnv("NODE_ENV"));
4833
+ }
4834
+ function makeSpanOrigin(instrumentationName, environment) {
4835
+ return {
4836
+ name: "braintrust.sdk.javascript",
4837
+ version: SDK_VERSION,
4838
+ instrumentation: { name: instrumentationName },
4839
+ ...environment ? { environment } : {}
4840
+ };
4841
+ }
4842
+ function mergeSpanOriginContext(context, instrumentationName, environment) {
4843
+ const next = { ...context ?? {} };
4844
+ const current = isObject2(next.span_origin) ? { ...next.span_origin } : {};
4845
+ next.span_origin = {
4846
+ ...makeSpanOrigin(instrumentationName, environment),
4847
+ ...current
4848
+ };
4849
+ return next;
4850
+ }
4851
+ function isSpanInstrumentationName(value) {
4852
+ return Object.values(INSTRUMENTATION_NAMES).some((name) => name === value);
4853
+ }
4854
+ function firstPresent(entries) {
4855
+ return entries.find(([key]) => Boolean(isomorph_default.getEnv(key)))?.[1];
4856
+ }
4857
+ function deploymentModeEnvironment(_key, value) {
4858
+ if (!value) return void 0;
4859
+ const normalized = value.toLowerCase();
4860
+ if (normalized === "production" || normalized === "staging") {
4861
+ return { type: "server", name: normalized };
4862
+ }
4863
+ if (normalized === "development" || normalized === "local") {
4864
+ return { type: "local", name: normalized };
4865
+ }
4866
+ return { name: value };
4867
+ }
4868
+ function isObject2(value) {
4869
+ return typeof value === "object" && value !== null && !Array.isArray(value);
4870
+ }
4871
+
4731
4872
  // src/logger.ts
4732
4873
  var BRAINTRUST_ATTACHMENT = BraintrustAttachmentReference.shape.type.value;
4733
4874
  var EXTERNAL_ATTACHMENT = ExternalAttachmentReference.shape.type.value;
@@ -4776,6 +4917,7 @@ var LoginInvalidOrgError = class extends Error {
4776
4917
  super(message);
4777
4918
  this.message = message;
4778
4919
  }
4920
+ message;
4779
4921
  };
4780
4922
  var REDACTION_FIELDS = [
4781
4923
  "input",
@@ -4791,6 +4933,8 @@ var MaskingError = class {
4791
4933
  this.fieldName = fieldName;
4792
4934
  this.errorType = errorType;
4793
4935
  }
4936
+ fieldName;
4937
+ errorType;
4794
4938
  get errorMsg() {
4795
4939
  return `ERROR: Failed to mask field '${this.fieldName}' - ${this.errorType}`;
4796
4940
  }
@@ -5000,7 +5144,10 @@ var BraintrustState = class _BraintrustState {
5000
5144
  diskCache: parametersDiskCache
5001
5145
  });
5002
5146
  this.spanCache = new SpanCache({ disabled: loginParams.disableSpanCache });
5147
+ this.spanOriginEnvironment = detectSpanOriginEnvironment();
5148
+ this._internalSetTraceContextSigningSecret(loginParams.apiKey);
5003
5149
  }
5150
+ loginParams;
5004
5151
  id;
5005
5152
  currentExperiment;
5006
5153
  // Note: the value of IsAsyncFlush doesn't really matter here, since we
@@ -5035,6 +5182,19 @@ var BraintrustState = class _BraintrustState {
5035
5182
  _idGenerator = null;
5036
5183
  _contextManager = null;
5037
5184
  _otelFlushCallback = null;
5185
+ spanOriginEnvironment;
5186
+ traceContextSigningSecret;
5187
+ /** @internal */
5188
+ _internalSetTraceContextSigningSecret(secret) {
5189
+ const normalizedSecret = secret?.trim();
5190
+ if (normalizedSecret) {
5191
+ this.traceContextSigningSecret = normalizedSecret;
5192
+ }
5193
+ }
5194
+ /** @internal */
5195
+ _internalGetTraceContextSigningSecret() {
5196
+ return (this.traceContextSigningSecret ?? this.loginToken ?? isomorph_default.getEnv("BRAINTRUST_API_KEY"))?.trim();
5197
+ }
5038
5198
  resetLoginInfo() {
5039
5199
  this.appUrl = null;
5040
5200
  this.appPublicUrl = null;
@@ -5095,6 +5255,7 @@ var BraintrustState = class _BraintrustState {
5095
5255
  this.gitMetadataSettings = other.gitMetadataSettings;
5096
5256
  this.debugLogLevel = other.debugLogLevel;
5097
5257
  this.debugLogLevelConfigured = other.debugLogLevelConfigured;
5258
+ this.traceContextSigningSecret = other.traceContextSigningSecret;
5098
5259
  setGlobalDebugLogLevel(
5099
5260
  this.debugLogLevelConfigured ? this.debugLogLevel ?? false : void 0
5100
5261
  );
@@ -5182,6 +5343,7 @@ var BraintrustState = class _BraintrustState {
5182
5343
  return this.debugLogLevelConfigured;
5183
5344
  }
5184
5345
  async login(loginParams) {
5346
+ this._internalSetTraceContextSigningSecret(loginParams.apiKey);
5185
5347
  this.setDebugLogLevel(loginParams.debugLogLevel);
5186
5348
  if (this.apiUrl && !loginParams.forceLogin) {
5187
5349
  return;
@@ -7422,7 +7584,9 @@ function deepCopyEvent(event) {
7422
7584
  const ATTACHMENT_MARKER_KEY = "_bt_internal_saved_attachment_marker";
7423
7585
  const attachmentMarker = ++deepCopyEventMarkerCounter;
7424
7586
  const serialized = JSON.stringify(event, (_k, v) => {
7425
- if (v instanceof SpanImpl || v instanceof NoopSpan) {
7587
+ if (v instanceof Error) {
7588
+ return v.message;
7589
+ } else if (v instanceof SpanImpl || v instanceof NoopSpan) {
7426
7590
  return `<span>`;
7427
7591
  } else if (v instanceof Experiment2) {
7428
7592
  return `<experiment>`;
@@ -7539,6 +7703,11 @@ var ObjectFetcher = class {
7539
7703
  this._internal_btql = _internal_btql;
7540
7704
  this._internalBrainstoreRealtime = _internalBrainstoreRealtime;
7541
7705
  }
7706
+ objectType;
7707
+ pinnedVersion;
7708
+ mutateRecord;
7709
+ _internal_btql;
7710
+ _internalBrainstoreRealtime;
7542
7711
  _fetchedData = void 0;
7543
7712
  get id() {
7544
7713
  throw new Error("ObjectFetcher subclasses must have an 'id' attribute");
@@ -8029,6 +8198,7 @@ var SpanImpl = class _SpanImpl {
8029
8198
  constructor(args) {
8030
8199
  this._state = args.state;
8031
8200
  this._propagatedState = args.propagatedState;
8201
+ const instrumentationName = getSpanInstrumentationName(args) ?? INSTRUMENTATION_NAMES.BRAINTRUST_JS_LOGGER;
8032
8202
  const spanAttributes = args.spanAttributes ?? {};
8033
8203
  const rawEvent = args.event ?? {};
8034
8204
  const type = args.type ?? (args.parentSpanIds ? void 0 : args.defaultRootType);
@@ -8058,7 +8228,11 @@ var SpanImpl = class _SpanImpl {
8058
8228
  metrics: {
8059
8229
  start: args.startTime ?? getCurrentUnixTimestamp()
8060
8230
  },
8061
- context: { ...callerLocation },
8231
+ context: mergeSpanOriginContext(
8232
+ { ...callerLocation },
8233
+ instrumentationName,
8234
+ this._state.spanOriginEnvironment
8235
+ ),
8062
8236
  span_attributes: {
8063
8237
  name,
8064
8238
  type,
@@ -8432,6 +8606,7 @@ var Dataset2 = class extends ObjectFetcher {
8432
8606
  this.pinnedEnvironment = pinState?.pinnedEnvironment;
8433
8607
  this.pinnedSnapshotName = pinState?.pinnedSnapshotName;
8434
8608
  }
8609
+ state;
8435
8610
  lazyMetadata;
8436
8611
  __braintrust_dataset_marker = true;
8437
8612
  newRecords = 0;
@@ -8912,17 +9087,20 @@ var BraintrustObservabilityExporter = class {
8912
9087
  }
8913
9088
  onStart(exported) {
8914
9089
  if (this.spans.has(exported.id)) return;
8915
- const args = {
8916
- name: exported.name,
8917
- spanAttributes: { type: spanTypeFor(exported.type) },
8918
- startTime: epochSeconds(exported.startTime),
8919
- // Use the Mastra span id as the Braintrust row id so that
8920
- // `logFeedback({ id: <mastra span id> })` (and Mastra's score events)
8921
- // attach to the right row. Without this, `SpanImpl` auto-generates a
8922
- // row id (`this._id = eventId ?? idGenerator.getSpanId()`) that no
8923
- // external caller could know.
8924
- event: { id: exported.id }
8925
- };
9090
+ const args = withSpanInstrumentationName(
9091
+ {
9092
+ name: exported.name,
9093
+ spanAttributes: { type: spanTypeFor(exported.type) },
9094
+ startTime: epochSeconds(exported.startTime),
9095
+ // Use the Mastra span id as the Braintrust row id so that
9096
+ // `logFeedback({ id: <mastra span id> })` (and Mastra's score events)
9097
+ // attach to the right row. Without this, `SpanImpl` auto-generates a
9098
+ // row id (`this._id = eventId ?? idGenerator.getSpanId()`) that no
9099
+ // external caller could know.
9100
+ event: { id: exported.id }
9101
+ },
9102
+ INSTRUMENTATION_NAMES.MASTRA
9103
+ );
8926
9104
  const parentRecord = exported.parentSpanId ? this.spans.get(exported.parentSpanId) : void 0;
8927
9105
  if (!this.capturedParent) {
8928
9106
  const probe = currentSpan();
@@ -8993,7 +9171,8 @@ function logExporterError(err) {
8993
9171
  function channel(spec) {
8994
9172
  return spec;
8995
9173
  }
8996
- function defineChannels(pkg, channels) {
9174
+ function defineChannels(pkg, channels, options) {
9175
+ const { instrumentationName } = options;
8997
9176
  return Object.fromEntries(
8998
9177
  Object.entries(channels).map(([key, spec]) => {
8999
9178
  const fullChannelName = `orchestrion:${pkg}:${spec.channelName}`;
@@ -9006,6 +9185,7 @@ function defineChannels(pkg, channels) {
9006
9185
  key,
9007
9186
  {
9008
9187
  ...asyncSpec,
9188
+ instrumentationName,
9009
9189
  tracingChannel: tracingChannel2,
9010
9190
  tracePromise: (fn, context) => tracingChannel2().tracePromise(
9011
9191
  fn,
@@ -9023,6 +9203,7 @@ function defineChannels(pkg, channels) {
9023
9203
  key,
9024
9204
  {
9025
9205
  ...syncSpec,
9206
+ instrumentationName,
9026
9207
  tracingChannel,
9027
9208
  traceSync: (fn, context) => tracingChannel().traceSync(
9028
9209
  fn,
@@ -9036,77 +9217,127 @@ function defineChannels(pkg, channels) {
9036
9217
  }
9037
9218
 
9038
9219
  // src/instrumentation/plugins/ai-sdk-channels.ts
9039
- var aiSDKChannels = defineChannels("ai", {
9040
- generateText: channel({
9041
- channelName: "generateText",
9042
- kind: "async"
9043
- }),
9044
- streamText: channel({
9045
- channelName: "streamText",
9046
- kind: "async"
9047
- }),
9048
- streamTextSync: channel({
9049
- channelName: "streamText.sync",
9050
- kind: "sync-stream"
9051
- }),
9052
- generateObject: channel({
9053
- channelName: "generateObject",
9054
- kind: "async"
9055
- }),
9056
- streamObject: channel({
9057
- channelName: "streamObject",
9058
- kind: "async"
9059
- }),
9060
- streamObjectSync: channel({
9061
- channelName: "streamObject.sync",
9062
- kind: "sync-stream"
9063
- }),
9064
- embed: channel(
9065
- {
9220
+ var aiSDKChannels = defineChannels(
9221
+ "ai",
9222
+ {
9223
+ generateText: channel({
9224
+ channelName: "generateText",
9225
+ kind: "async"
9226
+ }),
9227
+ streamText: channel({
9228
+ channelName: "streamText",
9229
+ kind: "async"
9230
+ }),
9231
+ streamTextSync: channel({
9232
+ channelName: "streamText.sync",
9233
+ kind: "sync-stream"
9234
+ }),
9235
+ generateObject: channel({
9236
+ channelName: "generateObject",
9237
+ kind: "async"
9238
+ }),
9239
+ streamObject: channel({
9240
+ channelName: "streamObject",
9241
+ kind: "async"
9242
+ }),
9243
+ streamObjectSync: channel({
9244
+ channelName: "streamObject.sync",
9245
+ kind: "sync-stream"
9246
+ }),
9247
+ embed: channel({
9066
9248
  channelName: "embed",
9067
9249
  kind: "async"
9068
- }
9069
- ),
9070
- embedMany: channel({
9071
- channelName: "embedMany",
9072
- kind: "async"
9073
- }),
9074
- rerank: channel({
9075
- channelName: "rerank",
9076
- kind: "async"
9077
- }),
9078
- agentGenerate: channel({
9079
- channelName: "Agent.generate",
9080
- kind: "async"
9081
- }),
9082
- agentStream: channel({
9083
- channelName: "Agent.stream",
9084
- kind: "async"
9085
- }),
9086
- agentStreamSync: channel({
9087
- channelName: "Agent.stream.sync",
9088
- kind: "sync-stream"
9089
- }),
9090
- toolLoopAgentGenerate: channel({
9091
- channelName: "ToolLoopAgent.generate",
9092
- kind: "async"
9093
- }),
9094
- toolLoopAgentStream: channel({
9095
- channelName: "ToolLoopAgent.stream",
9096
- kind: "async"
9097
- }),
9098
- workflowAgentStream: channel({
9099
- channelName: "WorkflowAgent.stream",
9100
- kind: "async"
9101
- }),
9102
- v7CreateTelemetryDispatcher: channel({
9103
- channelName: "createTelemetryDispatcher",
9104
- kind: "sync-stream"
9105
- })
9106
- });
9250
+ }),
9251
+ embedMany: channel({
9252
+ channelName: "embedMany",
9253
+ kind: "async"
9254
+ }),
9255
+ rerank: channel({
9256
+ channelName: "rerank",
9257
+ kind: "async"
9258
+ }),
9259
+ agentGenerate: channel({
9260
+ channelName: "Agent.generate",
9261
+ kind: "async"
9262
+ }),
9263
+ agentStream: channel({
9264
+ channelName: "Agent.stream",
9265
+ kind: "async"
9266
+ }),
9267
+ agentStreamSync: channel({
9268
+ channelName: "Agent.stream.sync",
9269
+ kind: "sync-stream"
9270
+ }),
9271
+ toolLoopAgentGenerate: channel({
9272
+ channelName: "ToolLoopAgent.generate",
9273
+ kind: "async"
9274
+ }),
9275
+ toolLoopAgentStream: channel({
9276
+ channelName: "ToolLoopAgent.stream",
9277
+ kind: "async"
9278
+ }),
9279
+ workflowAgentStream: channel({
9280
+ channelName: "WorkflowAgent.stream",
9281
+ kind: "async"
9282
+ }),
9283
+ v7CreateTelemetryDispatcher: channel({
9284
+ channelName: "createTelemetryDispatcher",
9285
+ kind: "sync-stream"
9286
+ })
9287
+ },
9288
+ { instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
9289
+ );
9290
+ var harnessAgentChannels = defineChannels(
9291
+ "@ai-sdk/harness",
9292
+ {
9293
+ createSession: channel({
9294
+ channelName: "HarnessAgent.createSession",
9295
+ kind: "async"
9296
+ }),
9297
+ generate: channel({
9298
+ channelName: "HarnessAgent.generate",
9299
+ kind: "async"
9300
+ }),
9301
+ stream: channel({
9302
+ channelName: "HarnessAgent.stream",
9303
+ kind: "async"
9304
+ }),
9305
+ continueGenerate: channel({
9306
+ channelName: "HarnessAgent.continueGenerate",
9307
+ kind: "async"
9308
+ }),
9309
+ continueStream: channel({
9310
+ channelName: "HarnessAgent.continueStream",
9311
+ kind: "async"
9312
+ })
9313
+ },
9314
+ { instrumentationName: INSTRUMENTATION_NAMES.AI_SDK }
9315
+ );
9107
9316
 
9108
9317
  // src/auto-instrumentations/configs/ai-sdk.ts
9109
9318
  var aiSDKConfigs = [
9319
+ // HarnessAgent turn methods are published only from the package's ESM
9320
+ // `./agent` entrypoint. The compiled class expression is anonymous, so match
9321
+ // the first async method with each public name instead of a class name.
9322
+ ...[
9323
+ ["createSession", harnessAgentChannels.createSession.channelName],
9324
+ ["generate", harnessAgentChannels.generate.channelName],
9325
+ ["stream", harnessAgentChannels.stream.channelName],
9326
+ ["continueGenerate", harnessAgentChannels.continueGenerate.channelName],
9327
+ ["continueStream", harnessAgentChannels.continueStream.channelName]
9328
+ ].map(([methodName, channelName]) => ({
9329
+ channelName,
9330
+ module: {
9331
+ name: "@ai-sdk/harness",
9332
+ versionRange: ">=1.0.0 <2.0.0",
9333
+ filePath: "dist/agent/index.js"
9334
+ },
9335
+ functionQuery: {
9336
+ methodName,
9337
+ kind: "Async",
9338
+ index: 0
9339
+ }
9340
+ })),
9110
9341
  // generateText - async function
9111
9342
  {
9112
9343
  channelName: aiSDKChannels.generateText.channelName,
@@ -9478,20 +9709,24 @@ var aiSDKConfigs = [
9478
9709
  ];
9479
9710
 
9480
9711
  // src/instrumentation/plugins/anthropic-channels.ts
9481
- var anthropicChannels = defineChannels("@anthropic-ai/sdk", {
9482
- messagesCreate: channel({
9483
- channelName: "messages.create",
9484
- kind: "async"
9485
- }),
9486
- betaMessagesCreate: channel({
9487
- channelName: "beta.messages.create",
9488
- kind: "async"
9489
- }),
9490
- betaMessagesToolRunner: channel({
9491
- channelName: "beta.messages.toolRunner",
9492
- kind: "sync-stream"
9493
- })
9494
- });
9712
+ var anthropicChannels = defineChannels(
9713
+ "@anthropic-ai/sdk",
9714
+ {
9715
+ messagesCreate: channel({
9716
+ channelName: "messages.create",
9717
+ kind: "async"
9718
+ }),
9719
+ betaMessagesCreate: channel({
9720
+ channelName: "beta.messages.create",
9721
+ kind: "async"
9722
+ }),
9723
+ betaMessagesToolRunner: channel({
9724
+ channelName: "beta.messages.toolRunner",
9725
+ kind: "sync-stream"
9726
+ })
9727
+ },
9728
+ { instrumentationName: INSTRUMENTATION_NAMES.ANTHROPIC }
9729
+ );
9495
9730
 
9496
9731
  // src/auto-instrumentations/configs/anthropic.ts
9497
9732
  var anthropicConfigs = [
@@ -9614,15 +9849,27 @@ var clientSendChannel = channel({
9614
9849
  channelName: "client.send",
9615
9850
  kind: "async"
9616
9851
  });
9617
- var bedrockRuntimeChannels = defineChannels("aws-bedrock-runtime", {
9618
- clientSend: clientSendChannel
9619
- });
9620
- var smithyCoreChannels = defineChannels("@smithy/core", {
9621
- clientSend: clientSendChannel
9622
- });
9623
- var smithyClientChannels = defineChannels("@smithy/smithy-client", {
9624
- clientSend: clientSendChannel
9625
- });
9852
+ var bedrockRuntimeChannels = defineChannels(
9853
+ "aws-bedrock-runtime",
9854
+ {
9855
+ clientSend: clientSendChannel
9856
+ },
9857
+ { instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
9858
+ );
9859
+ var smithyCoreChannels = defineChannels(
9860
+ "@smithy/core",
9861
+ {
9862
+ clientSend: clientSendChannel
9863
+ },
9864
+ { instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
9865
+ );
9866
+ var smithyClientChannels = defineChannels(
9867
+ "@smithy/smithy-client",
9868
+ {
9869
+ clientSend: clientSendChannel
9870
+ },
9871
+ { instrumentationName: INSTRUMENTATION_NAMES.BEDROCK_RUNTIME }
9872
+ );
9626
9873
 
9627
9874
  // src/auto-instrumentations/configs/bedrock-runtime.ts
9628
9875
  var bedrockRuntimeConfigs = [
@@ -9688,7 +9935,8 @@ var claudeAgentSDKChannels = defineChannels(
9688
9935
  channelName: "query",
9689
9936
  kind: "sync-stream"
9690
9937
  })
9691
- }
9938
+ },
9939
+ { instrumentationName: INSTRUMENTATION_NAMES.CLAUDE_AGENT_SDK }
9692
9940
  );
9693
9941
 
9694
9942
  // src/auto-instrumentations/configs/claude-agent-sdk.ts
@@ -9723,24 +9971,28 @@ var claudeAgentSDKConfigs = [
9723
9971
  ];
9724
9972
 
9725
9973
  // src/instrumentation/plugins/cohere-channels.ts
9726
- var cohereChannels = defineChannels("cohere-ai", {
9727
- chat: channel({
9728
- channelName: "chat",
9729
- kind: "async"
9730
- }),
9731
- chatStream: channel({
9732
- channelName: "chatStream",
9733
- kind: "async"
9734
- }),
9735
- embed: channel({
9736
- channelName: "embed",
9737
- kind: "async"
9738
- }),
9739
- rerank: channel({
9740
- channelName: "rerank",
9741
- kind: "async"
9742
- })
9743
- });
9974
+ var cohereChannels = defineChannels(
9975
+ "cohere-ai",
9976
+ {
9977
+ chat: channel({
9978
+ channelName: "chat",
9979
+ kind: "async"
9980
+ }),
9981
+ chatStream: channel({
9982
+ channelName: "chatStream",
9983
+ kind: "async"
9984
+ }),
9985
+ embed: channel({
9986
+ channelName: "embed",
9987
+ kind: "async"
9988
+ }),
9989
+ rerank: channel({
9990
+ channelName: "rerank",
9991
+ kind: "async"
9992
+ })
9993
+ },
9994
+ { instrumentationName: INSTRUMENTATION_NAMES.COHERE }
9995
+ );
9744
9996
 
9745
9997
  // src/auto-instrumentations/configs/cohere.ts
9746
9998
  var cohereConfigs = [
@@ -10007,24 +10259,28 @@ var cohereConfigs = [
10007
10259
  ];
10008
10260
 
10009
10261
  // src/instrumentation/plugins/cursor-sdk-channels.ts
10010
- var cursorSDKChannels = defineChannels("@cursor/sdk", {
10011
- create: channel({
10012
- channelName: "Agent.create",
10013
- kind: "async"
10014
- }),
10015
- resume: channel({
10016
- channelName: "Agent.resume",
10017
- kind: "async"
10018
- }),
10019
- prompt: channel({
10020
- channelName: "Agent.prompt",
10021
- kind: "async"
10022
- }),
10023
- send: channel({
10024
- channelName: "agent.send",
10025
- kind: "async"
10026
- })
10027
- });
10262
+ var cursorSDKChannels = defineChannels(
10263
+ "@cursor/sdk",
10264
+ {
10265
+ create: channel({
10266
+ channelName: "Agent.create",
10267
+ kind: "async"
10268
+ }),
10269
+ resume: channel({
10270
+ channelName: "Agent.resume",
10271
+ kind: "async"
10272
+ }),
10273
+ prompt: channel({
10274
+ channelName: "Agent.prompt",
10275
+ kind: "async"
10276
+ }),
10277
+ send: channel({
10278
+ channelName: "agent.send",
10279
+ kind: "async"
10280
+ })
10281
+ },
10282
+ { instrumentationName: INSTRUMENTATION_NAMES.CURSOR_SDK }
10283
+ );
10028
10284
 
10029
10285
  // src/auto-instrumentations/configs/cursor-sdk.ts
10030
10286
  var cursorSDKVersionRange = ">=1.0.7 <2.0.0";
@@ -10072,12 +10328,16 @@ var cursorSDKConfigs = cursorSDKEntrypoints.flatMap((filePath) => [
10072
10328
  ]);
10073
10329
 
10074
10330
  // src/instrumentation/plugins/flue-channels.ts
10075
- var flueChannels = defineChannels("@flue/runtime", {
10076
- createContext: channel({
10077
- channelName: "createFlueContext",
10078
- kind: "sync-stream"
10079
- })
10080
- });
10331
+ var flueChannels = defineChannels(
10332
+ "@flue/runtime",
10333
+ {
10334
+ createContext: channel({
10335
+ channelName: "createFlueContext",
10336
+ kind: "sync-stream"
10337
+ })
10338
+ },
10339
+ { instrumentationName: INSTRUMENTATION_NAMES.FLUE }
10340
+ );
10081
10341
 
10082
10342
  // src/auto-instrumentations/configs/flue.ts
10083
10343
  var flueVersionRange = ">=0.8.0 <1.0.0";
@@ -10097,38 +10357,46 @@ var flueConfigs = [
10097
10357
  ];
10098
10358
 
10099
10359
  // src/instrumentation/plugins/genkit-channels.ts
10100
- var genkitChannels = defineChannels("@genkit-ai/ai", {
10101
- generate: channel({
10102
- channelName: "generate",
10103
- kind: "async"
10104
- }),
10105
- generateStream: channel({
10106
- channelName: "generateStream",
10107
- kind: "sync-stream"
10108
- }),
10109
- embed: channel({
10110
- channelName: "embed",
10111
- kind: "async"
10112
- }),
10113
- embedMany: channel({
10114
- channelName: "embedMany",
10115
- kind: "async"
10116
- }),
10117
- actionRun: channel({
10118
- channelName: "action.run",
10119
- kind: "async"
10120
- }),
10121
- actionStream: channel({
10122
- channelName: "action.stream",
10123
- kind: "sync-stream"
10124
- })
10125
- });
10126
- var genkitCoreChannels = defineChannels("@genkit-ai/core", {
10127
- actionSpan: channel({
10128
- channelName: "action.span",
10129
- kind: "async"
10130
- })
10131
- });
10360
+ var genkitChannels = defineChannels(
10361
+ "@genkit-ai/ai",
10362
+ {
10363
+ generate: channel({
10364
+ channelName: "generate",
10365
+ kind: "async"
10366
+ }),
10367
+ generateStream: channel({
10368
+ channelName: "generateStream",
10369
+ kind: "sync-stream"
10370
+ }),
10371
+ embed: channel({
10372
+ channelName: "embed",
10373
+ kind: "async"
10374
+ }),
10375
+ embedMany: channel({
10376
+ channelName: "embedMany",
10377
+ kind: "async"
10378
+ }),
10379
+ actionRun: channel({
10380
+ channelName: "action.run",
10381
+ kind: "async"
10382
+ }),
10383
+ actionStream: channel({
10384
+ channelName: "action.stream",
10385
+ kind: "sync-stream"
10386
+ })
10387
+ },
10388
+ { instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
10389
+ );
10390
+ var genkitCoreChannels = defineChannels(
10391
+ "@genkit-ai/core",
10392
+ {
10393
+ actionSpan: channel({
10394
+ channelName: "action.span",
10395
+ kind: "async"
10396
+ })
10397
+ },
10398
+ { instrumentationName: INSTRUMENTATION_NAMES.GENKIT }
10399
+ );
10132
10400
 
10133
10401
  // src/auto-instrumentations/configs/genkit.ts
10134
10402
  var genkitVersionRange = ">=1.0.0 <2.0.0";
@@ -10290,20 +10558,24 @@ var genkitConfigs = [
10290
10558
  ];
10291
10559
 
10292
10560
  // src/instrumentation/plugins/github-copilot-channels.ts
10293
- var gitHubCopilotChannels = defineChannels("@github/copilot-sdk", {
10294
- createSession: channel({
10295
- channelName: "client.createSession",
10296
- kind: "async"
10297
- }),
10298
- resumeSession: channel({
10299
- channelName: "client.resumeSession",
10300
- kind: "async"
10301
- }),
10302
- sendAndWait: channel({
10303
- channelName: "session.sendAndWait",
10304
- kind: "async"
10305
- })
10306
- });
10561
+ var gitHubCopilotChannels = defineChannels(
10562
+ "@github/copilot-sdk",
10563
+ {
10564
+ createSession: channel({
10565
+ channelName: "client.createSession",
10566
+ kind: "async"
10567
+ }),
10568
+ resumeSession: channel({
10569
+ channelName: "client.resumeSession",
10570
+ kind: "async"
10571
+ }),
10572
+ sendAndWait: channel({
10573
+ channelName: "session.sendAndWait",
10574
+ kind: "async"
10575
+ })
10576
+ },
10577
+ { instrumentationName: INSTRUMENTATION_NAMES.GITHUB_COPILOT }
10578
+ );
10307
10579
 
10308
10580
  // src/auto-instrumentations/configs/github-copilot.ts
10309
10581
  var gitHubCopilotConfigs = [
@@ -10394,20 +10666,24 @@ var gitHubCopilotConfigs = [
10394
10666
  ];
10395
10667
 
10396
10668
  // src/instrumentation/plugins/google-adk-channels.ts
10397
- var googleADKChannels = defineChannels("@google/adk", {
10398
- runnerRunAsync: channel({
10399
- channelName: "runner.runAsync",
10400
- kind: "sync-stream"
10401
- }),
10402
- agentRunAsync: channel({
10403
- channelName: "agent.runAsync",
10404
- kind: "sync-stream"
10405
- }),
10406
- toolRunAsync: channel({
10407
- channelName: "tool.runAsync",
10408
- kind: "async"
10409
- })
10410
- });
10669
+ var googleADKChannels = defineChannels(
10670
+ "@google/adk",
10671
+ {
10672
+ runnerRunAsync: channel({
10673
+ channelName: "runner.runAsync",
10674
+ kind: "sync-stream"
10675
+ }),
10676
+ agentRunAsync: channel({
10677
+ channelName: "agent.runAsync",
10678
+ kind: "sync-stream"
10679
+ }),
10680
+ toolRunAsync: channel({
10681
+ channelName: "tool.runAsync",
10682
+ kind: "async"
10683
+ })
10684
+ },
10685
+ { instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_ADK }
10686
+ );
10411
10687
 
10412
10688
  // src/auto-instrumentations/configs/google-adk.ts
10413
10689
  var googleADKVersionRange = ">=0.1.0";
@@ -10638,24 +10914,28 @@ var googleADKConfigs = [
10638
10914
  ];
10639
10915
 
10640
10916
  // src/instrumentation/plugins/google-genai-channels.ts
10641
- var googleGenAIChannels = defineChannels("@google/genai", {
10642
- generateContent: channel({
10643
- channelName: "models.generateContent",
10644
- kind: "async"
10645
- }),
10646
- generateContentStream: channel({
10647
- channelName: "models.generateContentStream",
10648
- kind: "async"
10649
- }),
10650
- embedContent: channel({
10651
- channelName: "models.embedContent",
10652
- kind: "async"
10653
- }),
10654
- interactionsCreate: channel({
10655
- channelName: "interactions.create",
10656
- kind: "async"
10657
- })
10658
- });
10917
+ var googleGenAIChannels = defineChannels(
10918
+ "@google/genai",
10919
+ {
10920
+ generateContent: channel({
10921
+ channelName: "models.generateContent",
10922
+ kind: "async"
10923
+ }),
10924
+ generateContentStream: channel({
10925
+ channelName: "models.generateContentStream",
10926
+ kind: "async"
10927
+ }),
10928
+ embedContent: channel({
10929
+ channelName: "models.embedContent",
10930
+ kind: "async"
10931
+ }),
10932
+ interactionsCreate: channel({
10933
+ channelName: "interactions.create",
10934
+ kind: "async"
10935
+ })
10936
+ },
10937
+ { instrumentationName: INSTRUMENTATION_NAMES.GOOGLE_GENAI }
10938
+ );
10659
10939
 
10660
10940
  // src/auto-instrumentations/configs/google-genai.ts
10661
10941
  var googleGenAIConfigs = [
@@ -10735,18 +11015,20 @@ var googleGenAIConfigs = [
10735
11015
  ];
10736
11016
 
10737
11017
  // src/instrumentation/plugins/groq-channels.ts
10738
- var groqChannels = defineChannels("groq-sdk", {
10739
- chatCompletionsCreate: channel({
10740
- channelName: "chat.completions.create",
10741
- kind: "async"
10742
- }),
10743
- embeddingsCreate: channel(
10744
- {
11018
+ var groqChannels = defineChannels(
11019
+ "groq-sdk",
11020
+ {
11021
+ chatCompletionsCreate: channel({
11022
+ channelName: "chat.completions.create",
11023
+ kind: "async"
11024
+ }),
11025
+ embeddingsCreate: channel({
10745
11026
  channelName: "embeddings.create",
10746
11027
  kind: "async"
10747
- }
10748
- )
10749
- });
11028
+ })
11029
+ },
11030
+ { instrumentationName: INSTRUMENTATION_NAMES.GROQ }
11031
+ );
10750
11032
 
10751
11033
  // src/auto-instrumentations/configs/groq.ts
10752
11034
  var groqConfigs = [
@@ -10779,28 +11061,32 @@ var groqConfigs = [
10779
11061
  ];
10780
11062
 
10781
11063
  // src/instrumentation/plugins/huggingface-channels.ts
10782
- var huggingFaceChannels = defineChannels("@huggingface/inference", {
10783
- chatCompletion: channel({
10784
- channelName: "chatCompletion",
10785
- kind: "async"
10786
- }),
10787
- chatCompletionStream: channel({
10788
- channelName: "chatCompletionStream",
10789
- kind: "sync-stream"
10790
- }),
10791
- textGeneration: channel({
10792
- channelName: "textGeneration",
10793
- kind: "async"
10794
- }),
10795
- textGenerationStream: channel({
10796
- channelName: "textGenerationStream",
10797
- kind: "sync-stream"
10798
- }),
10799
- featureExtraction: channel({
10800
- channelName: "featureExtraction",
10801
- kind: "async"
10802
- })
10803
- });
11064
+ var huggingFaceChannels = defineChannels(
11065
+ "@huggingface/inference",
11066
+ {
11067
+ chatCompletion: channel({
11068
+ channelName: "chatCompletion",
11069
+ kind: "async"
11070
+ }),
11071
+ chatCompletionStream: channel({
11072
+ channelName: "chatCompletionStream",
11073
+ kind: "sync-stream"
11074
+ }),
11075
+ textGeneration: channel({
11076
+ channelName: "textGeneration",
11077
+ kind: "async"
11078
+ }),
11079
+ textGenerationStream: channel({
11080
+ channelName: "textGenerationStream",
11081
+ kind: "sync-stream"
11082
+ }),
11083
+ featureExtraction: channel({
11084
+ channelName: "featureExtraction",
11085
+ kind: "async"
11086
+ })
11087
+ },
11088
+ { instrumentationName: INSTRUMENTATION_NAMES.HUGGINGFACE }
11089
+ );
10804
11090
 
10805
11091
  // src/auto-instrumentations/configs/huggingface.ts
10806
11092
  var huggingFaceConfigs = [
@@ -11047,16 +11333,20 @@ var huggingFaceConfigs = [
11047
11333
  ];
11048
11334
 
11049
11335
  // src/instrumentation/plugins/langchain-channels.ts
11050
- var langChainChannels = defineChannels("@langchain/core", {
11051
- configure: channel({
11052
- channelName: "CallbackManager.configure",
11053
- kind: "sync-stream"
11054
- }),
11055
- configureSync: channel({
11056
- channelName: "CallbackManager._configureSync",
11057
- kind: "sync-stream"
11058
- })
11059
- });
11336
+ var langChainChannels = defineChannels(
11337
+ "@langchain/core",
11338
+ {
11339
+ configure: channel({
11340
+ channelName: "CallbackManager.configure",
11341
+ kind: "sync-stream"
11342
+ }),
11343
+ configureSync: channel({
11344
+ channelName: "CallbackManager._configureSync",
11345
+ kind: "sync-stream"
11346
+ })
11347
+ },
11348
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGCHAIN }
11349
+ );
11060
11350
 
11061
11351
  // src/auto-instrumentations/configs/langchain.ts
11062
11352
  var langChainCoreVersionRange = ">=0.3.42";
@@ -11091,20 +11381,24 @@ var langchainConfigs = [
11091
11381
  ];
11092
11382
 
11093
11383
  // src/instrumentation/plugins/langsmith-channels.ts
11094
- var langSmithChannels = defineChannels("langsmith", {
11095
- createRun: channel({
11096
- channelName: "Client.createRun",
11097
- kind: "async"
11098
- }),
11099
- updateRun: channel({
11100
- channelName: "Client.updateRun",
11101
- kind: "async"
11102
- }),
11103
- batchIngestRuns: channel({
11104
- channelName: "Client.batchIngestRuns",
11105
- kind: "async"
11106
- })
11107
- });
11384
+ var langSmithChannels = defineChannels(
11385
+ "langsmith",
11386
+ {
11387
+ createRun: channel({
11388
+ channelName: "Client.createRun",
11389
+ kind: "async"
11390
+ }),
11391
+ updateRun: channel({
11392
+ channelName: "Client.updateRun",
11393
+ kind: "async"
11394
+ }),
11395
+ batchIngestRuns: channel({
11396
+ channelName: "Client.batchIngestRuns",
11397
+ kind: "async"
11398
+ })
11399
+ },
11400
+ { instrumentationName: INSTRUMENTATION_NAMES.LANGSMITH }
11401
+ );
11108
11402
 
11109
11403
  // src/auto-instrumentations/configs/langsmith.ts
11110
11404
  var versionRange = ">=0.3.30 <1.0.0";
@@ -11141,52 +11435,56 @@ var langSmithConfigs = [
11141
11435
  ];
11142
11436
 
11143
11437
  // src/instrumentation/plugins/mistral-channels.ts
11144
- var mistralChannels = defineChannels("@mistralai/mistralai", {
11145
- chatComplete: channel({
11146
- channelName: "chat.complete",
11147
- kind: "async"
11148
- }),
11149
- chatStream: channel({
11150
- channelName: "chat.stream",
11151
- kind: "async"
11152
- }),
11153
- embeddingsCreate: channel({
11154
- channelName: "embeddings.create",
11155
- kind: "async"
11156
- }),
11157
- classifiersModerate: channel({
11158
- channelName: "classifiers.moderate",
11159
- kind: "async"
11160
- }),
11161
- classifiersModerateChat: channel({
11162
- channelName: "classifiers.moderateChat",
11163
- kind: "async"
11164
- }),
11165
- classifiersClassify: channel({
11166
- channelName: "classifiers.classify",
11167
- kind: "async"
11168
- }),
11169
- classifiersClassifyChat: channel({
11170
- channelName: "classifiers.classifyChat",
11171
- kind: "async"
11172
- }),
11173
- fimComplete: channel({
11174
- channelName: "fim.complete",
11175
- kind: "async"
11176
- }),
11177
- fimStream: channel({
11178
- channelName: "fim.stream",
11179
- kind: "async"
11180
- }),
11181
- agentsComplete: channel({
11182
- channelName: "agents.complete",
11183
- kind: "async"
11184
- }),
11185
- agentsStream: channel({
11186
- channelName: "agents.stream",
11187
- kind: "async"
11188
- })
11189
- });
11438
+ var mistralChannels = defineChannels(
11439
+ "@mistralai/mistralai",
11440
+ {
11441
+ chatComplete: channel({
11442
+ channelName: "chat.complete",
11443
+ kind: "async"
11444
+ }),
11445
+ chatStream: channel({
11446
+ channelName: "chat.stream",
11447
+ kind: "async"
11448
+ }),
11449
+ embeddingsCreate: channel({
11450
+ channelName: "embeddings.create",
11451
+ kind: "async"
11452
+ }),
11453
+ classifiersModerate: channel({
11454
+ channelName: "classifiers.moderate",
11455
+ kind: "async"
11456
+ }),
11457
+ classifiersModerateChat: channel({
11458
+ channelName: "classifiers.moderateChat",
11459
+ kind: "async"
11460
+ }),
11461
+ classifiersClassify: channel({
11462
+ channelName: "classifiers.classify",
11463
+ kind: "async"
11464
+ }),
11465
+ classifiersClassifyChat: channel({
11466
+ channelName: "classifiers.classifyChat",
11467
+ kind: "async"
11468
+ }),
11469
+ fimComplete: channel({
11470
+ channelName: "fim.complete",
11471
+ kind: "async"
11472
+ }),
11473
+ fimStream: channel({
11474
+ channelName: "fim.stream",
11475
+ kind: "async"
11476
+ }),
11477
+ agentsComplete: channel({
11478
+ channelName: "agents.complete",
11479
+ kind: "async"
11480
+ }),
11481
+ agentsStream: channel({
11482
+ channelName: "agents.stream",
11483
+ kind: "async"
11484
+ })
11485
+ },
11486
+ { instrumentationName: INSTRUMENTATION_NAMES.MISTRAL }
11487
+ );
11190
11488
 
11191
11489
  // src/auto-instrumentations/configs/mistral.ts
11192
11490
  var mistralConfigs = [
@@ -11479,24 +11777,28 @@ var mistralConfigs = [
11479
11777
  ];
11480
11778
 
11481
11779
  // src/instrumentation/plugins/openai-agents-channels.ts
11482
- var openAIAgentsCoreChannels = defineChannels("@openai/agents-core", {
11483
- onTraceStart: channel({
11484
- channelName: "tracing.processor.onTraceStart",
11485
- kind: "async"
11486
- }),
11487
- onTraceEnd: channel({
11488
- channelName: "tracing.processor.onTraceEnd",
11489
- kind: "async"
11490
- }),
11491
- onSpanStart: channel({
11492
- channelName: "tracing.processor.onSpanStart",
11493
- kind: "async"
11494
- }),
11495
- onSpanEnd: channel({
11496
- channelName: "tracing.processor.onSpanEnd",
11497
- kind: "async"
11498
- })
11499
- });
11780
+ var openAIAgentsCoreChannels = defineChannels(
11781
+ "@openai/agents-core",
11782
+ {
11783
+ onTraceStart: channel({
11784
+ channelName: "tracing.processor.onTraceStart",
11785
+ kind: "async"
11786
+ }),
11787
+ onTraceEnd: channel({
11788
+ channelName: "tracing.processor.onTraceEnd",
11789
+ kind: "async"
11790
+ }),
11791
+ onSpanStart: channel({
11792
+ channelName: "tracing.processor.onSpanStart",
11793
+ kind: "async"
11794
+ }),
11795
+ onSpanEnd: channel({
11796
+ channelName: "tracing.processor.onSpanEnd",
11797
+ kind: "async"
11798
+ })
11799
+ },
11800
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENAI_AGENTS }
11801
+ );
11500
11802
 
11501
11803
  // src/auto-instrumentations/configs/openai-agents.ts
11502
11804
  var lifecycleMethods = [
@@ -11524,44 +11826,48 @@ var openAIAgentsCoreConfigs = lifecycleMethods.flatMap(
11524
11826
  );
11525
11827
 
11526
11828
  // src/instrumentation/plugins/openai-channels.ts
11527
- var openAIChannels = defineChannels("openai", {
11528
- chatCompletionsCreate: channel({
11529
- channelName: "chat.completions.create",
11530
- kind: "async"
11531
- }),
11532
- embeddingsCreate: channel({
11533
- channelName: "embeddings.create",
11534
- kind: "async"
11535
- }),
11536
- betaChatCompletionsParse: channel({
11537
- channelName: "beta.chat.completions.parse",
11538
- kind: "async"
11539
- }),
11540
- betaChatCompletionsStream: channel({
11541
- channelName: "beta.chat.completions.stream",
11542
- kind: "sync-stream"
11543
- }),
11544
- moderationsCreate: channel({
11545
- channelName: "moderations.create",
11546
- kind: "async"
11547
- }),
11548
- responsesCreate: channel({
11549
- channelName: "responses.create",
11550
- kind: "async"
11551
- }),
11552
- responsesStream: channel({
11553
- channelName: "responses.stream",
11554
- kind: "sync-stream"
11555
- }),
11556
- responsesParse: channel({
11557
- channelName: "responses.parse",
11558
- kind: "async"
11559
- }),
11560
- responsesCompact: channel({
11561
- channelName: "responses.compact",
11562
- kind: "async"
11563
- })
11564
- });
11829
+ var openAIChannels = defineChannels(
11830
+ "openai",
11831
+ {
11832
+ chatCompletionsCreate: channel({
11833
+ channelName: "chat.completions.create",
11834
+ kind: "async"
11835
+ }),
11836
+ embeddingsCreate: channel({
11837
+ channelName: "embeddings.create",
11838
+ kind: "async"
11839
+ }),
11840
+ betaChatCompletionsParse: channel({
11841
+ channelName: "beta.chat.completions.parse",
11842
+ kind: "async"
11843
+ }),
11844
+ betaChatCompletionsStream: channel({
11845
+ channelName: "beta.chat.completions.stream",
11846
+ kind: "sync-stream"
11847
+ }),
11848
+ moderationsCreate: channel({
11849
+ channelName: "moderations.create",
11850
+ kind: "async"
11851
+ }),
11852
+ responsesCreate: channel({
11853
+ channelName: "responses.create",
11854
+ kind: "async"
11855
+ }),
11856
+ responsesStream: channel({
11857
+ channelName: "responses.stream",
11858
+ kind: "sync-stream"
11859
+ }),
11860
+ responsesParse: channel({
11861
+ channelName: "responses.parse",
11862
+ kind: "async"
11863
+ }),
11864
+ responsesCompact: channel({
11865
+ channelName: "responses.compact",
11866
+ kind: "async"
11867
+ })
11868
+ },
11869
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENAI }
11870
+ );
11565
11871
 
11566
11872
  // src/auto-instrumentations/configs/openai.ts
11567
11873
  var openaiConfigs = [
@@ -11743,16 +12049,20 @@ var openaiConfigs = [
11743
12049
  ];
11744
12050
 
11745
12051
  // src/instrumentation/plugins/openai-codex-channels.ts
11746
- var openAICodexChannels = defineChannels("@openai/codex-sdk", {
11747
- run: channel({
11748
- channelName: "Thread.run",
11749
- kind: "async"
11750
- }),
11751
- runStreamed: channel({
11752
- channelName: "Thread.runStreamed",
11753
- kind: "async"
11754
- })
11755
- });
12052
+ var openAICodexChannels = defineChannels(
12053
+ "@openai/codex-sdk",
12054
+ {
12055
+ run: channel({
12056
+ channelName: "Thread.run",
12057
+ kind: "async"
12058
+ }),
12059
+ runStreamed: channel({
12060
+ channelName: "Thread.runStreamed",
12061
+ kind: "async"
12062
+ })
12063
+ },
12064
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENAI_CODEX }
12065
+ );
11756
12066
 
11757
12067
  // src/auto-instrumentations/configs/openai-codex.ts
11758
12068
  var openAICodexVersionRange = ">=0.128.0 <1.0.0";
@@ -11786,38 +12096,40 @@ var openAICodexConfigs = [
11786
12096
  ];
11787
12097
 
11788
12098
  // src/instrumentation/plugins/openrouter-channels.ts
11789
- var openRouterChannels = defineChannels("@openrouter/sdk", {
11790
- chatSend: channel({
11791
- channelName: "chat.send",
11792
- kind: "async"
11793
- }),
11794
- embeddingsGenerate: channel({
11795
- channelName: "embeddings.generate",
11796
- kind: "async"
11797
- }),
11798
- rerankRerank: channel(
11799
- {
12099
+ var openRouterChannels = defineChannels(
12100
+ "@openrouter/sdk",
12101
+ {
12102
+ chatSend: channel({
12103
+ channelName: "chat.send",
12104
+ kind: "async"
12105
+ }),
12106
+ embeddingsGenerate: channel({
12107
+ channelName: "embeddings.generate",
12108
+ kind: "async"
12109
+ }),
12110
+ rerankRerank: channel({
11800
12111
  channelName: "rerank.rerank",
11801
12112
  kind: "async"
11802
- }
11803
- ),
11804
- betaResponsesSend: channel({
11805
- channelName: "beta.responses.send",
11806
- kind: "async"
11807
- }),
11808
- callModel: channel({
11809
- channelName: "callModel",
11810
- kind: "sync-stream"
11811
- }),
11812
- callModelTurn: channel({
11813
- channelName: "callModel.turn",
11814
- kind: "async"
11815
- }),
11816
- toolExecute: channel({
11817
- channelName: "tool.execute",
11818
- kind: "async"
11819
- })
11820
- });
12113
+ }),
12114
+ betaResponsesSend: channel({
12115
+ channelName: "beta.responses.send",
12116
+ kind: "async"
12117
+ }),
12118
+ callModel: channel({
12119
+ channelName: "callModel",
12120
+ kind: "sync-stream"
12121
+ }),
12122
+ callModelTurn: channel({
12123
+ channelName: "callModel.turn",
12124
+ kind: "async"
12125
+ }),
12126
+ toolExecute: channel({
12127
+ channelName: "tool.execute",
12128
+ kind: "async"
12129
+ })
12130
+ },
12131
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER }
12132
+ );
11821
12133
 
11822
12134
  // src/auto-instrumentations/configs/openrouter.ts
11823
12135
  var openRouterConfigs = [
@@ -11825,7 +12137,7 @@ var openRouterConfigs = [
11825
12137
  channelName: openRouterChannels.chatSend.channelName,
11826
12138
  module: {
11827
12139
  name: "@openrouter/sdk",
11828
- versionRange: ">=0.9.11 <1.0.0",
12140
+ versionRange: ">=0.9.11 <2.0.0",
11829
12141
  filePath: "esm/sdk/chat.js"
11830
12142
  },
11831
12143
  functionQuery: {
@@ -11838,7 +12150,7 @@ var openRouterConfigs = [
11838
12150
  channelName: openRouterChannels.embeddingsGenerate.channelName,
11839
12151
  module: {
11840
12152
  name: "@openrouter/sdk",
11841
- versionRange: ">=0.9.11 <1.0.0",
12153
+ versionRange: ">=0.9.11 <2.0.0",
11842
12154
  filePath: "esm/sdk/embeddings.js"
11843
12155
  },
11844
12156
  functionQuery: {
@@ -11851,7 +12163,7 @@ var openRouterConfigs = [
11851
12163
  channelName: openRouterChannels.rerankRerank.channelName,
11852
12164
  module: {
11853
12165
  name: "@openrouter/sdk",
11854
- versionRange: ">=0.12.0 <1.0.0",
12166
+ versionRange: ">=0.12.0 <2.0.0",
11855
12167
  filePath: "esm/sdk/rerank.js"
11856
12168
  },
11857
12169
  functionQuery: {
@@ -11864,7 +12176,7 @@ var openRouterConfigs = [
11864
12176
  channelName: openRouterChannels.betaResponsesSend.channelName,
11865
12177
  module: {
11866
12178
  name: "@openrouter/sdk",
11867
- versionRange: ">=0.9.11 <1.0.0",
12179
+ versionRange: ">=0.9.11 <2.0.0",
11868
12180
  filePath: "esm/sdk/responses.js"
11869
12181
  },
11870
12182
  functionQuery: {
@@ -11877,7 +12189,7 @@ var openRouterConfigs = [
11877
12189
  channelName: openRouterChannels.callModel.channelName,
11878
12190
  module: {
11879
12191
  name: "@openrouter/sdk",
11880
- versionRange: ">=0.9.11 <1.0.0",
12192
+ versionRange: ">=0.9.11 <2.0.0",
11881
12193
  filePath: "esm/sdk/sdk.js"
11882
12194
  },
11883
12195
  functionQuery: {
@@ -11889,20 +12201,24 @@ var openRouterConfigs = [
11889
12201
  ];
11890
12202
 
11891
12203
  // src/instrumentation/plugins/openrouter-agent-channels.ts
11892
- var openRouterAgentChannels = defineChannels("@openrouter/agent", {
11893
- callModel: channel({
11894
- channelName: "callModel",
11895
- kind: "sync-stream"
11896
- }),
11897
- callModelTurn: channel({
11898
- channelName: "callModel.turn",
11899
- kind: "async"
11900
- }),
11901
- toolExecute: channel({
11902
- channelName: "tool.execute",
11903
- kind: "async"
11904
- })
11905
- });
12204
+ var openRouterAgentChannels = defineChannels(
12205
+ "@openrouter/agent",
12206
+ {
12207
+ callModel: channel({
12208
+ channelName: "callModel",
12209
+ kind: "sync-stream"
12210
+ }),
12211
+ callModelTurn: channel({
12212
+ channelName: "callModel.turn",
12213
+ kind: "async"
12214
+ }),
12215
+ toolExecute: channel({
12216
+ channelName: "tool.execute",
12217
+ kind: "async"
12218
+ })
12219
+ },
12220
+ { instrumentationName: INSTRUMENTATION_NAMES.OPENROUTER_AGENT }
12221
+ );
11906
12222
 
11907
12223
  // src/auto-instrumentations/configs/openrouter-agent.ts
11908
12224
  var openRouterAgentConfigs = [
@@ -11928,11 +12244,12 @@ var piCodingAgentChannels = defineChannels(
11928
12244
  channelName: "AgentSession.prompt",
11929
12245
  kind: "async"
11930
12246
  })
11931
- }
12247
+ },
12248
+ { instrumentationName: INSTRUMENTATION_NAMES.PI_CODING_AGENT }
11932
12249
  );
11933
12250
 
11934
12251
  // src/auto-instrumentations/configs/pi-coding-agent.ts
11935
- var piCodingAgentVersionRange = ">=0.79.0 <0.80.0";
12252
+ var piCodingAgentVersionRange = ">=0.79.0 <0.82.0";
11936
12253
  var piCodingAgentConfigs = [
11937
12254
  {
11938
12255
  channelName: piCodingAgentChannels.prompt.channelName,
@@ -11950,20 +12267,24 @@ var piCodingAgentConfigs = [
11950
12267
  ];
11951
12268
 
11952
12269
  // src/instrumentation/plugins/strands-agent-sdk-channels.ts
11953
- var strandsAgentSDKChannels = defineChannels("@strands-agents/sdk", {
11954
- agentStream: channel({
11955
- channelName: "Agent.stream",
11956
- kind: "sync-stream"
11957
- }),
11958
- graphStream: channel({
11959
- channelName: "Graph.stream",
11960
- kind: "sync-stream"
11961
- }),
11962
- swarmStream: channel({
11963
- channelName: "Swarm.stream",
11964
- kind: "sync-stream"
11965
- })
11966
- });
12270
+ var strandsAgentSDKChannels = defineChannels(
12271
+ "@strands-agents/sdk",
12272
+ {
12273
+ agentStream: channel({
12274
+ channelName: "Agent.stream",
12275
+ kind: "sync-stream"
12276
+ }),
12277
+ graphStream: channel({
12278
+ channelName: "Graph.stream",
12279
+ kind: "sync-stream"
12280
+ }),
12281
+ swarmStream: channel({
12282
+ channelName: "Swarm.stream",
12283
+ kind: "sync-stream"
12284
+ })
12285
+ },
12286
+ { instrumentationName: INSTRUMENTATION_NAMES.STRANDS_AGENT_SDK }
12287
+ );
11967
12288
 
11968
12289
  // src/auto-instrumentations/configs/strands-agent-sdk.ts
11969
12290
  var strandsAgentSDKVersionRange = ">=1.0.0 <2.0.0";