@mastra/observability 1.9.2-alpha.1 → 1.10.0-alpha.2

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
@@ -19144,14 +19144,16 @@ var ModelSpanTracker = class {
19144
19144
  dynamic,
19145
19145
  providerExecuted,
19146
19146
  providerMetadata,
19147
- // Output - the actual result
19147
+ // Keep provider-executed results on MODEL_CHUNK because they come
19148
+ // from the model/provider stream and may not have a sibling TOOL_CALL span.
19149
+ // For locally executed tools, the canonical payload lives on TOOL_CALL.
19148
19150
  result} = chunk.payload || {};
19149
19151
  const metadata = { toolCallId, toolName };
19150
19152
  if (isError !== void 0) metadata.isError = isError;
19151
19153
  if (dynamic !== void 0) metadata.dynamic = dynamic;
19152
19154
  if (providerExecuted !== void 0) metadata.providerExecuted = providerExecuted;
19153
19155
  if (providerMetadata !== void 0) metadata.providerMetadata = providerMetadata;
19154
- this.#createEventSpan(chunk.type, result, { metadata });
19156
+ this.#createEventSpan(chunk.type, providerExecuted ? result : void 0, { metadata });
19155
19157
  break;
19156
19158
  }
19157
19159
  }