Skip to main content
GET
Get Trace Spans
Returns the flat list of spans for a trace, ordered by timestamp. The frontend builds the parent-child tree from parent_span_id.

Path Parameters

trace_id
string
required
The OpenTelemetry trace ID.

Query Parameters

extra
string
Comma-separated list of additional trace IDs to merge in (used for OpenClaw multi-trace sessions). All spans are returned sorted by start_ns.

Response

Array of span detail objects:
span_id
string
Unique span identifier
parent_span_id
string
Parent span ID. Empty string for root spans.
span_name
string
Operation name
span_kind
string
OTel span kind: INTERNAL, SERVER, CLIENT, etc.
service_name
string
Service that emitted this span
start_ns
integer
Start time as Unix nanoseconds
duration_ns
integer
Duration in nanoseconds
status_code
string
STATUS_CODE_OK, STATUS_CODE_ERROR, or STATUS_CODE_UNSET
status_message
string
Error message if status is ERROR
attributes
object
Full SpanAttributes map — all tracectrl.*, openinference.*, input.*, output.* attributes
resource_attributes
object
Resource-level attributes (service name, SDK version, etc.)