tempo commands

3 commands, each with a one-line explanation. Click a command to copy it, or its title for details.

Commands 3 shown

  • { .service.name = "api" && status = error && duration > 2s }

    Find error spans on a service slower than 2s. combine attribute, status and duration.

    traceql · performance · troubleshooting

  • curl -sG "$TEMPO_ADDR/api/search" --data-urlencode 'q={ .http.status_code >= 500 }' --data-urlencode 'limit=20' | jq '.traces[].traceID'

    Search traces by TraceQL over HTTP and list matching trace IDs. limit caps results.

    traceql · api · observability

  • curl -s "$TEMPO_ADDR/api/traces/<id>" | jq '.batches[].scopeSpans[].spans[] | {name, durationNs: (.endTimeUnixNano|tonumber)-(.startTimeUnixNano|tonumber)}'

    Pull a trace by ID and compute per-span duration. note: times are unix nanos.

    api · debug · observability