Query Spans
spansFind individual spans matching filter criteria within a time range.
This is a DRILL-DOWN tool. For "where are errors / latency concentrated?" start with aggregate_spans, then use this to fetch example spans for a (service, operation).
Returns spans sorted by (timestamp, spanId) descending (newest first).
Returns the span's core fields by default; pass verbose=true to include its
attributes (flattened in, plus a resource object). Long string values are capped
(maxStringChars). For raw columns or custom selection use run_sql.
Defaults: from is 1 hour before to (or before now) when omitted — set it to read further back; to is now when omitted; limit 100 (max 1000); all filters any. Common patterns:
Errored spans of an operation: statusCode="ERROR", name="http.client"
Slow spans: minDurationMs=500
Every span of a trace: traceId="..." (or use get_trace)
A span is viewed in the context of its trace. To show one to the user, call get_trace with its traceId and hand them traceUrl, which opens the trace as a waterfall in the Fixter app, rather than drawing the span yourself.
Returns: spans[], nextCursor (null on last page), queryStats, and truncationHint when the page was cut to fit the response (nextCursor then reads on from the last span shown).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of window, ISO-8601 instant (exclusive); now when omitted | |
| from | No | Start of window, ISO-8601 instant (inclusive); 1 hour before to (or now) when omitted | |
| kind | No | Filter by kind: SERVER, CLIENT, PRODUCER, CONSUMER, INTERNAL | |
| name | No | Filter by operation/span name (e.g. 'GET /things') | |
| limit | No | Max spans, default 100, max 1000 | |
| cursor | No | Opaque cursor from a previous next_cursor | |
| service | No | Filter by service name | |
| traceId | No | Filter to a single trace id | |
| verbose | No | Return full spans incl. attributes and resource. Default false. | |
| statusCode | No | Filter by status: UNSET, OK, ERROR | |
| minDurationMs | No | Only spans at least this many milliseconds long | |
| maxStringChars | No | Max characters of any attribute string value before truncation, at most 4000. Omit to use the server default. |