npm / @mastra/observability
@mastra/observability
What changed in @mastra/observability 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-21.
3 new APIs and options5 behavior and defaults6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@mastra/observability 114 changes
New APIs and options 3
Model tracing records completionStartTime on the first response chunk and copies it to the model step, model generation, and agent run span, enabling time-to-first-chunk calculations at every level.
Controls price refresh behavior: refresh is on by default under mastra dev and off by default in other environments.
Disables price refresh everywhere, regardless of the MASTRA_AUTO_REFRESH_PRICING setting.
Behavior and default changes 5
Classifier token usage now contributes to token and cost metrics and appears in Studio traces, with estimated costs when the model has a known price.
Bundled model pricing was updated with the latest prices from models.dev, affecting estimated costs for models with known prices.
The model label on cost metrics now uses the models.dev model ID for some models, so charts grouped by model can show them under a new name.
Cost estimates use model prices from models.dev; models no longer listed there retain token metrics but no longer receive cost estimates.
Custom gateways can return pricing from fetchProviders() to provide cost estimates for models that models.dev doesn't price.
Fixes and other changes 6
Suspended or approval-waiting tool calls now report token usage and end model step and inference spans as suspended; later approval requests from the same step no longer create empty spans.
Cost estimates for inference profiles with the
in.prefix no longer reportno_matching_model.Tracking exporters wait for in-progress trace-cap evictions in
flush()andshutdown(), ensuring aborted spans are sent instead of queued after flushing or aborted twice.MastraStorageExporter and DefaultExporter flush() now wait for storage writes already started by a batch timer or size trigger, preventing spans from being lost when a process exits.
Spans keep and export links they were started with and links set before they end; links with invalid W3C trace or span IDs are ignored.
MastraStorageExporter and DefaultExporter shutdown() now wait for storage writes already started by a batch timer or size trigger, preventing spans from being lost when a process exits.