@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.js CHANGED
@@ -2447,6 +2447,16 @@ var ModelSpanTracker = class {
2447
2447
  });
2448
2448
  }
2449
2449
  /**
2450
+ * End the open MODEL_INFERENCE span as interrupted while keeping MODEL_STEP open,
2451
+ * so a replacement request for the same step gets its own inference span.
2452
+ */
2453
+ interruptInference() {
2454
+ this.#endChunkSpan();
2455
+ if (!this.#currentInferenceSpan) return;
2456
+ this.#currentInferenceSpan.end({ attributes: { finishReason: "interrupted" } });
2457
+ this.#currentInferenceSpan = void 0;
2458
+ }
2459
+ /**
2450
2460
  * Update the current step span with additional payload data.
2451
2461
  * Called when step-start chunk arrives with request/warnings info.
2452
2462
  */