The traces endpoint retrieves every span belonging to a single trace and returns them as a nested tree. This is the same data structure that powers the Trace Viewer in the LumiqTrace dashboard. Use it to programmatically inspect multi-step LLM pipelines, identify which span caused a failure, or measure latency across each step in a chain.Documentation Index
Fetch the complete documentation index at: https://docs.lumiqtrace.com/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
Authorization: Bearer <token> (see Authentication)
Path Parameters
The
trace_id shared by all spans in the trace you want to retrieve. This is the same value you set on events when you ingested them.Query Parameters
The ID of the project that owns this trace.
Example Request
Response
200 OK — Returns an array of root spans. Each span may contain achildren array of child spans, forming a recursive tree.
Unique identifier for this span within the trace.
The
span_id of the parent span. null for root spans.Recursively nested child spans. An empty array means this span is a leaf node.
All other fields on each span match the LumiqEvent schema. The only addition is the
children array, which is not present in the raw event.Understanding the Span Tree
Root spans are LLM calls that were not triggered by another LLM call — typically the first call in a pipeline. Child spans are calls that occurred inside the context of a parent call, such as an embedding lookup performed during a RAG retrieval step. If a span in your application is not appearing as a child of the expected parent, verify that itsparent_span_id is set to the correct span_id and that both spans share the same trace_id.