tempo
3 commands
3 shown
TraceQL slow error traces
Find error spans on a service slower than 2s. combine attribute, status and duration.
{ .service.name = "api" && status = error && duration > 2s }
TraceQL search via API
Search traces by TraceQL over HTTP and list matching trace IDs. limit caps results.
curl -sG "$TEMPO_ADDR/api/search" --data-urlencode 'q={ .http.status_code >= 500 }' --data-urlencode 'limit=20' | jq '.traces[].traceID'
Fetch full trace by ID
Pull a trace by ID and compute per-span duration. note: times are unix nanos.
curl -s "$TEMPO_ADDR/api/traces/<id>" | jq '.batches[].scopeSpans[].spans[] | {name, durationNs: (.endTimeUnixNano|tonumber)-(.startTimeUnixNano|tonumber)}'
no commands match