@mastra/observability 1.14.4-alpha.0 → 1.15.0-alpha.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/CHANGELOG.md +31 -0
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/dist/model-tracing.d.ts +3 -1
- package/dist/model-tracing.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1864,9 +1864,19 @@ var ModelSpanTracker = class {
|
|
|
1864
1864
|
};
|
|
1865
1865
|
}
|
|
1866
1866
|
/**
|
|
1867
|
-
* Report an error on the generation span
|
|
1867
|
+
* Report an error on the generation span, also closing any still-open
|
|
1868
|
+
* MODEL_INFERENCE / MODEL_STEP children so a fatal error before step-finish
|
|
1869
|
+
* doesn't leave them dangling. No-op if they were already closed.
|
|
1868
1870
|
*/
|
|
1869
1871
|
reportGenerationError(options) {
|
|
1872
|
+
if (this.#currentInferenceSpan) {
|
|
1873
|
+
this.#currentInferenceSpan.error({ error: options.error, endSpan: true });
|
|
1874
|
+
this.#currentInferenceSpan = void 0;
|
|
1875
|
+
}
|
|
1876
|
+
if (this.#currentStepSpan) {
|
|
1877
|
+
this.#currentStepSpan.error({ error: options.error, endSpan: true });
|
|
1878
|
+
this.#currentStepSpan = void 0;
|
|
1879
|
+
}
|
|
1870
1880
|
this.#modelSpan?.error(options);
|
|
1871
1881
|
}
|
|
1872
1882
|
/**
|