New Sign up free, 10 calls on us. Up to $1, no card needed.

Traces and Sessions

See one agent run as a timeline and a whole conversation as one session: which calls ran in parallel, where the time went, what failed and what it cost.

In the console sidebar (it appears once the feature applies to your account): Traces Open it ↗

Steps

  1. Send X-Trace-Id on every call of one run (one user request, one agent task), X-Span-Id to name each call, and X-Session-Id on every call of one conversation. Tools that send their own trace or session headers, such as Claude Code, are grouped without changes.
  2. Open Traces. Traces and sessions of the last 7 days are listed with their calls, duration and cost, the latest request first; select a column heading to order the list by it. Rename on a trace or session gives it a name the whole workspace sees. Search takes a complete id or any part of a name.
  3. Open a trace for its waterfall: one bar per call, placed in time, with the stretches where your own code was running shown as your app. Calls made in parallel overlap. A failed call is hatched and shows its status code; select a call for its latency, tokens and cost.
  4. Open a session for its totals, its models, its errors by status code and its calls over time. See the calls in Logs lists every request of the session.

Limits and gotchas

  • Traces and sessions are built from your request log, so they cover the same 90 days and the same calls the log shows you.
  • A failed call shows the status code your code received, including an error the provider returned.
  • The ids are yours: up to 128 printable ASCII characters each. They come back on the response and are never sent to the provider.
  • When a coding agent names its sub-agents, a session lists its agents with the calls and cost of each, and a trace marks compactions and side calls and names the tools that ran between two calls.
  • A request the gateway had to try more than once lists its attempts in its detail: the model, the status and the time of each. In the waterfall the failed attempts are the hatched start of its bar.

API reference for the same thing: Request Headers