Release2026-10-28

Mastra added span queries to filter and group individual spans across traces. They let users spot failing or slow tools by error rate, latency, and more. Queries can combine up to 100 conditions and return up to 1,000 spans per page. Span groups can aggregate by up to 2 dimensions over a 365-day window. They work on Mastra platform and self-hosted projects using DuckDB, PostgreSQL, or ClickHouse. Existing trace data can be imported into Mastra. Span queries run via CLI, platform, Studio, Client SDK, or observability endpoints. US and EU regions have separate base URLs for observability.

What changed

Trace queries returned whole traces, making individual failures harder to isolate.

What it unlocks

Filtering and grouping individual spans within traces to identify and fix common coding agent failures.

  • up to 100 conditions per query
  • up to 1,000 spans per page
  • up to 2 dimensions for grouping
  • time range up to 365 days

What you need to act on it

  • Mastra platform or self-hosted project with DuckDB, PostgreSQL, or ClickHouse storage
  • platform access token and project ID
  • mastra@1.36.0 or later for CLI
  • @mastra/client-js@1.57.0 or later for SDK

Send this to someone who needs it

Shares the story and its sources. Nothing about you.

What does this mean for your job?

This is the story as everyone gets it. Once a week we send you the version written for your role — what changed, why it matters for the work you actually do, and one thing to try. Free while we tune it.