Query Distributed Traces
query_tracesSearch distributed traces (Tempo/TraceQL) — find slow or failing requests across workloads, then drill in with get_trace. Provide structured params (gvc, workload, location, errorsOnly, minDuration) OR a raw traceql query — a raw query REPLACES the structured params, so it must embed ALL filters itself. Span attributes available: resource.gvc, resource.workload, resource.location. Traces exist only where tracing is enabled on the GVC (spec.tracing via update_gvc/create_gvc) and only for sampled requests after enablement. Returns a table of trace IDs with root span, start time, and duration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Absolute end time (exclusive, ISO 8601). | |
| gvc | No | Filter traces to one GVC (matches the `resource.gvc` span attribute). | |
| org | Yes | Organization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants. | |
| from | No | Absolute start time (inclusive, ISO 8601). Overrides `since`. Must be earlier than `to`. | |
| limit | No | Maximum traces to return (default: 20, max: 100). | |
| since | No | Lookback window as relative duration (default: "1h"). Examples: "30m", "2h", "1d". | |
| traceql | No | Raw TraceQL query (e.g. `{ resource.workload = "api" && status = error }`). REPLACES the structured params entirely, so it must embed ALL filters itself. Span attributes available: resource.gvc, resource.workload, resource.location. | |
| location | No | Filter traces to one location (e.g., "aws-us-east-1"). | |
| workload | No | Filter traces to one workload (matches the `resource.workload` span attribute). | |
| errorsOnly | No | Only return traces containing at least one error span. | |
| minDuration | No | Only return traces slower than this total duration (e.g., "500ms", "2s") — the slow-request finder. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary. | |
| summary | Yes | One-line summary of the result. | |
| nextSteps | No | Recommended follow-up actions for this task, in order. |