Prerequisites
- An existing context with at least one task (see Send a message)
- An access token or client credentials
What are OpenInference traces
OpenInference is an open standard for tracing LLM applications. Each trace contains spans that represent individual operations: LLM calls, connector invocations, tool usage, and more. Each span has attributes likellm.token_count.total, tool.name, and input.value.
Export traces
Pagination
The trace endpoint supports pagination withpageSize (default: 50, max: 200) and pageToken query parameters. The response includes nextPageToken (opaque cursor for the next page, or null if there are no more pages) and totalSize (not currently populated by the server):
Trace structure
The response contains atraces array, ordered newest first. Each trace has:
Each span has:
Using traces for debugging
Traces help you understand:- Which connectors were called: Look for spans with
tool.nameattributes - How many tokens were consumed: Look for
llm.token_count.totalattributes - What inputs were sent to connectors: Look for
input.valueattributes - How long each step took: Compare
start_timeacross spans - The reasoning chain: Follow
parent_span_idto reconstruct the call tree
Next steps
- Learn how to work with contexts via the API
- Read about viewing usage for aggregated metrics
- Understand the architecture for how traces fit into the system