@mastra/observability 1.16.6-alpha.2 → 1.16.6-alpha.3
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/CHANGELOG.md +9 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/model-tracing.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2056,13 +2056,15 @@ var ModelSpanTracker = class {
|
|
|
2056
2056
|
if (!this.#currentInferenceSpan) return;
|
|
2057
2057
|
const { usage: rawUsage, ...otherOutput } = payload.output;
|
|
2058
2058
|
const usage = extractUsageMetrics(rawUsage, payload.metadata?.providerMetadata);
|
|
2059
|
+
const responseModel = typeof payload.metadata?.modelId === "string" ? payload.metadata.modelId : void 0;
|
|
2059
2060
|
this.#currentInferenceSpan.end({
|
|
2060
2061
|
output: otherOutput,
|
|
2061
2062
|
attributes: {
|
|
2062
2063
|
usage,
|
|
2063
2064
|
finishReason: payload.stepResult.reason,
|
|
2064
2065
|
warnings: payload.stepResult.warnings,
|
|
2065
|
-
completionStartTime: this.#completionStartTime
|
|
2066
|
+
completionStartTime: this.#completionStartTime,
|
|
2067
|
+
...responseModel?.trim() ? { responseModel } : {}
|
|
2066
2068
|
}
|
|
2067
2069
|
});
|
|
2068
2070
|
this.#currentInferenceSpan = void 0;
|