@mastra/observability 1.19.0-alpha.2 → 1.19.0-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/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/model-tracing.d.ts +5 -0
- package/dist/model-tracing.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2472,6 +2472,16 @@ var ModelSpanTracker = class {
|
|
|
2472
2472
|
});
|
|
2473
2473
|
}
|
|
2474
2474
|
/**
|
|
2475
|
+
* End the open MODEL_INFERENCE span as interrupted while keeping MODEL_STEP open,
|
|
2476
|
+
* so a replacement request for the same step gets its own inference span.
|
|
2477
|
+
*/
|
|
2478
|
+
interruptInference() {
|
|
2479
|
+
this.#endChunkSpan();
|
|
2480
|
+
if (!this.#currentInferenceSpan) return;
|
|
2481
|
+
this.#currentInferenceSpan.end({ attributes: { finishReason: "interrupted" } });
|
|
2482
|
+
this.#currentInferenceSpan = void 0;
|
|
2483
|
+
}
|
|
2484
|
+
/**
|
|
2475
2485
|
* Update the current step span with additional payload data.
|
|
2476
2486
|
* Called when step-start chunk arrives with request/warnings info.
|
|
2477
2487
|
*/
|