Skip to main content
Search

mastra.ai

3 related articles

Subscribe to updates
  1. mastra.ai

    Mastra adds span queries: traces no longer come back whole, so failing tool calls surface directly

    Mastra has introduced span queries, moving observability queries from the whole trace down to individual spans inside it. Trace queries could already filter on deep details such as a failed tool call, but they still returned the entire trace, making the problematic call hard to spot. Span queries search within each trace and return only matching spans, and matching spans can be grouped or aggregated into counts, error rates and latency to show which tool is failing or slow.

  2. mastra.ai

    Mastra adds latency metrics to observability: see whether an agent's first response waits on the model or your own code

    Mastra platform and Studio now record two latency metrics for every agent and model call: TTFC, the time a user waits before the first chunk arrives, and TTFT, the time the model takes to start responding. Previously durationMs showed only how long a run took, not how long a user waited for the first response or whether that wait came from the model or from the application's own code. Both metrics are recorded on every span, from the model call up to the agent run, and can be filtered and sorted as fields in trace and span queries on Mastra platform and on self-hosted projects whose storage uses DuckDB, PostgreSQL, or ClickHouse.

  3. mastra.ai

    Mastra opens production metrics as a query API: cost, latency and error rates by model and thread

    Mastra has released a Metrics API that lets developers query token usage, model cost, latency and error rates for production projects through the client SDK, CLI or observability endpoints. Previously these metrics were only viewable in the Mastra platform and Studio, with no way to construct custom queries. Queries can now combine time ranges, status filters and grouping to produce totals, breakdowns, time series and percentile data for custom reports, dashboards, downstream delivery and alerts when cost or error rates rise.

You’re all caught up