Skip to main content
Observability spans are records generated during agent runs that capture timing, model usage, token consumption, and error details. Use the observability resource to query spans across runs or retrieve the full record for a specific span.

Query spans

Use query_spans to retrieve span summaries matching a set of filters. All filters are optional. If min_start_time is not provided, the query defaults to the last 15 minutes. Start with run_id to scope results to a specific run. Endpoint: POST /v1/observability/spans
Additional filters you can combine:

Retrieve a span

Use retrieve_span to fetch the full span object for a specific span by ID. Unlike query_spans, which returns summaries, this returns the complete record. Endpoint: GET /v1/observability/spans/{span_id}

Investigate a failed run

A common pattern is to query spans for a run, then retrieve a specific span to investigate further.
Last modified on June 26, 2026