Fetch a full trace by ID
Get a trace by ID and calculate the duration of each span. Note: times are in Unix nanoseconds
curl -s "$TEMPO_ADDR/api/traces/<id>" | jq '.batches[].scopeSpans[].spans[] | {name, durationNs: (.endTimeUnixNano|tonumber)-(.startTimeUnixNano|tonumber)}'
- tool
- tempo3 commands
More tempo commands
-
{ .service.name = "api" && status = error && duration > 2s }Find error spans of a service that take longer than 2s. It combines an attribute, status and duration
-
curl -sG "$TEMPO_ADDR/api/search" --data-urlencode 'q={ .http.status_code >= 500 }' --data-urlencode 'limit=20' | jq '.traces[].traceID'Search traces with TraceQL over HTTP and list matching trace IDs. limit caps the number of results