Retrieve detailed trace information with hierarchical span tree, or a specific span within the trace.
Without span_id parameter: Returns the full trace with hierarchical span tree:
With span_id parameter: Returns details for a specific span within the trace:
Span Hierarchy:
The tree field contains root spans, each with potential children.
This recursive structure represents the execution flow.
Span Types:
AGENT: Agent execution with input/outputLLM: Model invocations with tokens and promptsTOOL: Tool calls with parameters and resultsBearer authentication header of the form Bearer <token>, where <token> is your auth token.
Trace ID to retrieve
Optional span ID to retrieve specific span
Optional run ID to retrieve trace for
Database ID to query trace from
Trace or span detail retrieved successfully
Unique trace identifier
Name of the root operation
Overall status (OK, ERROR, UNSET)
Human-readable duration
When the trace started
When the trace completed
Hierarchical span tree
Number of spans in this trace
Number of spans that errored
Input to the root operation
Output from the root operation
Error message if status is ERROR
Associated run ID
Associated session ID
Associated user ID
Associated agent ID
Associated team ID
Associated workflow ID
When the trace record was created