Skip to main content
This guide shows you how to export OpenInference-format traces for a context. Traces provide detailed observability into the agent’s reasoning, connector calls, and tool usage.

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 like llm.token_count.total, tool.name, and input.value.

Export traces

Pagination

The trace endpoint supports pagination with pageSize (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 a traces 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.name attributes
  • How many tokens were consumed: Look for llm.token_count.total attributes
  • What inputs were sent to connectors: Look for input.value attributes
  • How long each step took: Compare start_time across spans
  • The reasoning chain: Follow parent_span_id to reconstruct the call tree

Next steps