Skip to Content
Launching the open-source gateway

Inspect spans and traces

Open a span, trace or thread to find what went wrong, then rerun it.

Select any row in Logs to open it in a side panel. Read one model call, walk an agent run span by span, or read a whole conversation, then rerun the call to test a fix.

Debug a request

Open the row

Go to Observability › Logs and pick a grouping in the filter row:

  • Spans to see one call on its own.
  • Traces to see the whole run it belonged to.
  • Threads to see the conversation. See Follow a session with threads.

Click a row. The side panel opens on the right.

Read the span

The header shows the span ID, its type and model, and the API key, customer ID, thread ID and custom properties the span recorded. If the span failed or has warnings, the error shows at the top.

Span side panel for an anthropic.chat span, with Run, Assign to and the more menu, tags for model, API key, customer and thread, custom properties, and the Messages, Tools, Metrics, Metadata and Config tabs
TabWhat it shows
MessagesThe input and output, including tool calls. Switch the view between Pretty, Markdown, JSON and YAML. Speech and transcription spans show Audio instead.
ToolsThe tools sent with the request.
MetricsTokens, Cost, Latency and Characters. Click a row for its breakdown, such as cache reads or time to first token. Behaviors that fired on the span are listed below.
MetadataIdentifiers and custom properties.
ConfigGeneration settings, Advanced settings, Respan gateway config and Additional parameters.

Messages and Metrics show only when the span has data for them. To see the whole span as JSON or YAML, click Open raw metadata (the {} icon) in the toolbar. Assign to sends the span to one of your evaluators for review.

Walk the trace

If the span is part of an agent or workflow run, click ⋯ › Open in Traces. Logs switches to the Traces grouping, filtered to that run. Click the row to open it.

Trace side panel with the trace ID in the toolbar and a support_agent workflow tree: classify_intent with an openai.chat call, and answer_question with a search_docs tool call and an anthropic.chat call, each with a bar on the timeline. The selected anthropic.chat span shows on the right under its span ID

The toolbar shows the trace ID. The tree on the left lists every span in the run, with each child under the span that called it. The timeline next to it shows when each span started and how long it ran. Click a span to see it on the right, under its own span ID, in the Span (input and output) and Metadata tabs.

Above the tree, you can filter it by span type, show or hide each span’s duration, tokens and cost, and turn the timeline on or off. In a narrow browser window, the tree shrinks to icons and the timeline hides.

For a slow run, start at the longest bar in the timeline. For a wrong answer, look for the earliest span with bad data, not the last span that shows the failure.

Rerun the call

On a chat span’s Messages tab, the Output header has two rerun buttons:

  • Rerun followed by the model name sends the same input to the same model again.
  • Other sends it to a model you pick.

Each run is added next to Original, so you can compare the outputs. To try a follow-up turn, type it in Continue conversation… and click Run.

The Output section of a span, with the Rerun claude-sonnet-4-5-20250929 and Other buttons above the assistant reply

To edit the prompt, tools or settings first, click Run in the header, or press P. Respan opens the span in a new playground with its messages, model and settings. See Playground.

To keep the prompt for reuse, click ⋯ › Save as Prompt.

The trace panel has no Run button. To rerun a call from a trace, click the span, then click Open in Spans (the arrow next to its ID). A new tab opens Logs in the Spans grouping, filtered to that span.

Follow a session with threads

A thread is every span that shares a thread_identifier, in time order. It can cover several traces. To group your spans this way, send thread_identifier with each span. See Custom IDs & attributes.

Switch the grouping to Threads and click a row. The panel has two tabs: Messages, the conversation so far, and Metadata, the thread’s identifiers and properties.

Thread side panel showing a support conversation: the system prompt, the user's first question, the assistant's reply, and the user's follow-up

To dig into one turn, switch to Traces and filter by Thread ID, then open the trace where things went wrong.

Share a span, trace or thread

Click the copy icon next to an ID:

  • Span: Copy ID, Copy URL, Copy title, Copy title as link, Copy input messages (Copy all or Copy without base64), Copy output messages, Copy timestamp and Copy model name.
  • Trace: next to the trace ID in the toolbar, Copy ID, Copy trace URL and Copy title as link. Next to the selected span’s ID, Copy ID, Copy span URL and Copy title as link.
  • Thread: Copy ID, Copy URL, Copy title and Copy title as link.

A copied URL opens Logs filtered to the same item. Open in new tab in the toolbar opens that URL for you.

Keyboard shortcuts

ShortcutAction
↑ / ↓Previous or next row. In a trace, previous or next span; past the first or last span, the previous or next trace.
← / →Switch tabs
JToggle the JSON view of Messages
POpen the span or thread in the Playground
TIn a span, open it in a new tab. In a trace, show or hide the timeline.
⌘ \ (Ctrl \ on Windows)Full screen
EscClose the panel

Troubleshooting

No traces appear

Check the environment and time range, then clear your filters. If the request still isn’t there, your app may not be sending traces yet. Follow the Tracing quickstart or set up an integration.

A run shows up as separate traces

Model calls show up as separate traces when your app doesn’t create a parent span around them. Wrap the run in a parent span, for example with the SDK’s @workflow and @task decorators, or use a framework integration.

Messages are empty

Some span types don’t record messages. Check Metadata and Config instead. If logging is turned off for your organization, or with disable_log on the request, Respan doesn’t store message content. Messages and Tools stay empty, and Run and the rerun buttons are off.