unstale

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

@unstale/cli 0.2.1 on npm

@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.

    1.21.0release notes

  • Controls price refresh behavior: refresh is on by default under mastra dev and off by default in other environments.

    1.20.0release notes

  • Disables price refresh everywhere, regardless of the MASTRA_AUTO_REFRESH_PRICING setting.

    1.20.0release notes

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.

    1.21.0release notes

  • Bundled model pricing was updated with the latest prices from models.dev, affecting estimated costs for models with known prices.

    1.20.1release notesrelease notes

  • 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.

    1.20.0release notes

  • Cost estimates use model prices from models.dev; models no longer listed there retain token metrics but no longer receive cost estimates.

    1.20.0release notes

  • Custom gateways can return pricing from fetchProviders() to provide cost estimates for models that models.dev doesn't price.

    1.20.0release notes

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.

    1.21.0release notes

  • Cost estimates for inference profiles with the in. prefix no longer report no_matching_model.

    1.20.1release notes

  • Tracking exporters wait for in-progress trace-cap evictions in flush() and shutdown(), ensuring aborted spans are sent instead of queued after flushing or aborted twice.

    1.20.1release notes

  • 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.

    1.20.0release notes

  • 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.

    1.20.0release notes

  • 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.

    1.20.0release notes