@mastra/inngest 1.8.10 → 1.8.11
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
|
@@ -287,14 +287,12 @@ function createInngestDurableAgenticWorkflow(options) {
|
|
|
287
287
|
state: state.state
|
|
288
288
|
};
|
|
289
289
|
const observability = mastra?.observability?.getSelectedInstance({});
|
|
290
|
-
if (state.modelSpanData) (observability?.rebuildSpan(state.modelSpanData))?.
|
|
291
|
-
output: {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
},
|
|
295
|
-
attributes: { finishReason: state.lastStepResult?.reason || "stop" }
|
|
290
|
+
if (state.modelSpanData) (observability?.rebuildSpan(state.modelSpanData))?.createTracker()?.endGeneration({
|
|
291
|
+
output: { text: finalText },
|
|
292
|
+
attributes: { finishReason: state.lastStepResult?.reason || "stop" },
|
|
293
|
+
usage: state.accumulatedUsage
|
|
296
294
|
});
|
|
297
|
-
if (state.agentSpanData) (observability?.rebuildSpan(state.agentSpanData))?.end({ output:
|
|
295
|
+
if (state.agentSpanData) (observability?.rebuildSpan(state.agentSpanData))?.end({ output: { text: finalText } });
|
|
298
296
|
if (pubsub) await emitFinishEvent(pubsub, state.runId, {
|
|
299
297
|
output: finalOutput.output,
|
|
300
298
|
stepResult: finalOutput.stepResult
|