langsmith 0.3.35 → 0.3.36

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.
@@ -123,6 +123,15 @@ class LangSmithOTLPTraceExporter extends exporter_trace_otlp_proto_1.OTLPTraceEx
123
123
  span.attributes["ai.toolCall.args"];
124
124
  }
125
125
  }
126
+ // Iterate over all attributes starting with "ai.telemetry.metadata"
127
+ for (const [key, value] of Object.entries(span.attributes)) {
128
+ if (key.startsWith("ai.telemetry.metadata.")) {
129
+ const metadataKey = key.replace("ai.telemetry.metadata.", "");
130
+ span.attributes[`${constants.LANGSMITH_METADATA}.${metadataKey}`] =
131
+ value;
132
+ delete span.attributes[key];
133
+ }
134
+ }
126
135
  if (!span.attributes[constants.GENAI_COMPLETION]) {
127
136
  if (span.attributes["ai.response.text"]) {
128
137
  span.attributes[constants.GENAI_COMPLETION] =
@@ -87,6 +87,15 @@ export class LangSmithOTLPTraceExporter extends OTLPTraceExporter {
87
87
  span.attributes["ai.toolCall.args"];
88
88
  }
89
89
  }
90
+ // Iterate over all attributes starting with "ai.telemetry.metadata"
91
+ for (const [key, value] of Object.entries(span.attributes)) {
92
+ if (key.startsWith("ai.telemetry.metadata.")) {
93
+ const metadataKey = key.replace("ai.telemetry.metadata.", "");
94
+ span.attributes[`${constants.LANGSMITH_METADATA}.${metadataKey}`] =
95
+ value;
96
+ delete span.attributes[key];
97
+ }
98
+ }
90
99
  if (!span.attributes[constants.GENAI_COMPLETION]) {
91
100
  if (span.attributes["ai.response.text"]) {
92
101
  span.attributes[constants.GENAI_COMPLETION] =
package/dist/index.cjs CHANGED
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "overrideFetchImplementation", { enumerable: true
10
10
  var project_js_1 = require("./utils/project.cjs");
11
11
  Object.defineProperty(exports, "getDefaultProjectName", { enumerable: true, get: function () { return project_js_1.getDefaultProjectName; } });
12
12
  // Update using yarn bump-version
13
- exports.__version__ = "0.3.35";
13
+ exports.__version__ = "0.3.36";
package/dist/index.d.ts CHANGED
@@ -3,4 +3,4 @@ export type { Dataset, Example, TracerSession, Run, Feedback, RetrieverOutput, }
3
3
  export { RunTree, type RunTreeConfig } from "./run_trees.js";
4
4
  export { overrideFetchImplementation } from "./singletons/fetch.js";
5
5
  export { getDefaultProjectName } from "./utils/project.js";
6
- export declare const __version__ = "0.3.35";
6
+ export declare const __version__ = "0.3.36";
package/dist/index.js CHANGED
@@ -3,4 +3,4 @@ export { RunTree } from "./run_trees.js";
3
3
  export { overrideFetchImplementation } from "./singletons/fetch.js";
4
4
  export { getDefaultProjectName } from "./utils/project.js";
5
5
  // Update using yarn bump-version
6
- export const __version__ = "0.3.35";
6
+ export const __version__ = "0.3.36";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "langsmith",
3
- "version": "0.3.35",
3
+ "version": "0.3.36",
4
4
  "description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
5
5
  "packageManager": "yarn@1.22.19",
6
6
  "files": [