Briefs · Taipei time (GMT+8)

Mastra adds span queries so coding agents can pinpoint failed tool calls

一句重點:Instead of combing through an entire run, developers can pull out the step that failed or slowed down and hand it to an agent to fix.

發生什麼事

@mastra announced span queries. The new option narrows an investigation to matching steps inside a trace. A trace query could find runs with a failed tool call, but its result was the whole trace; a span query returns only the steps (spans) that match your filters (Introducing Span Queries).

Filters cover type, name, status, error, and duration. You can also aggregate counts, error rates, and p50, p95, and p99 latency. Each query accepts up to 100 conditions, and each page returns up to 1,000 results. Grouped aggregates support up to two dimensions and a maximum 365-day window.

01Sources