Query spans
Usequery_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 Query spans
| Parameter | Description |
|---|---|
agent_id | Filter by agent |
thread_id | Filter by thread |
trace_id | Filter by trace |
group | Filter by group |
metadata | Filter by custom metadata key-value pairs |
min_start_time | Filter spans starting after this datetime. Defaults to 15 minutes before the request time if not provided. |
max_start_time | Filter spans starting before this datetime |
limit | Number of results to return (default: 100) |
offset | Pagination offset (default: 0) |
order | Sort order by start time (asc or desc, default: desc) |
Retrieve a span
Useretrieve_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} Retrieve span