View and debug traces

Find a problematic run, follow its execution, and identify the span that caused the failure.

Use the Traces page when an error, latency spike, unexpected cost, or user report points to a specific application run. A trace connects the complete run to every model call, tool invocation, task, and workflow step that happened inside it.

This guide follows one investigation from the trace list to the span that needs attention.

Respan Traces table over the last month with All traces selected and columns for time, workflow, duration, token usage, and span count.
The Traces page is the starting point for investigating production runs.

Choose the right level

Respan groups telemetry at three levels:

SurfaceWhat it representsUse it when
SpansOne operation, such as an LLM call, tool call, or taskYou already know which individual operation to inspect
TracesOne end-to-end run made of related spansYou need to understand where a workflow or agent run went wrong
ThreadsTime-ordered spans that share a thread identifierYou need the history of a multi-turn conversation or session; its spans can be distributed across traces

For details about the hierarchy, see Tracing core concepts.

Investigate a run

1

Open Traces and set the time range

In the platform sidebar, go to Logs → Traces, or open the Traces page.

Set the time range in the upper-right corner to cover the incident. The Time column includes the timezone used to display each timestamp.

If the table is empty, widen the time range before changing your filters. This quickly separates “no data in this window” from “a filter excluded the data.”

2

Narrow the table to candidate traces

Select Filter, then choose the field that describes the symptom. The filter builder includes identifiers such as Trace ID, Thread ID, and Customer ID; operational fields such as Workflow name, Errors, Duration, Status, and token counts; and dimensions such as Provider, Model, and Custom properties.

Use Add filter group when the investigation needs another group of conditions. Check the resulting rows before saving the filter setup.

Starting signalUseful first filter
Error alertErrors or Status, plus workflow or environment metadata
Slow requestDuration, then workflow, model, or provider
Cost increaseCost or token count, then model or customer
User reportCustomer ID or Thread ID, plus the incident time range
Known runTrace ID
Respan trace filter menu listing trace, thread, customer, and span identifiers plus workflow, errors, tokens, duration, status, provider, model, and custom properties.
Filters turn a broad time window into a focused set of candidate traces.

A trace can contain many spans. A trace-level total, such as total duration, tokens, span count, cost, or errors, describes the complete run. Open the trace before deciding which individual span caused that total.

3

Show the columns that help answer the question

Open the table settings control to choose the sort field and direction, and to show or hide columns. A useful default investigation layout is:

  • Time and Workflow for context
  • Duration for slow runs
  • Input, Output, and Total for token usage
  • Spans for unexpectedly long agent paths
  • Cost and Errors for impact

Show Trace ID when you need to correlate a row with application logs. Hide identifiers and API-key columns before sharing a screenshot.

Respan trace table settings with a time sort control and visibility controls for workflow, duration, token, span, cost, error, trace ID, API key, trace input, and trace output columns.
Sort the results and keep only the columns relevant to the incident.
4

Save a repeatable investigation view

After confirming that the filters return the intended traces, select Save view and give the view a specific name, such as Production errors or Slow checkout traces.

A saved view lets the team return to the same filter setup without rebuilding it. To update, duplicate, or reuse views, see Views and saved filters.

5

Open a trace and read its execution

Select a row to open the trace workspace. Keep these regions connected while you investigate:

  1. The selected trace in the results table.
  2. The nested span hierarchy, which shows parent-child execution order.
  3. The duration timeline, which shows when each span ran and how long it took.

Indented spans are children of the span above them. Expand a branch to inspect its work, then compare its duration bar with neighboring spans. The longest bar is the best place to begin a latency investigation, but it is not automatically the root cause of an error.

Respan trace workspace with a selected trace on the left and its nested agent, task, and chat spans aligned to a duration timeline on the right.
Read the span hierarchy and duration timeline together to reconstruct the run.
6

Focus the hierarchy on relevant span types

Open the span-type filter in the trace workspace. Search for a type or select only the types relevant to the investigation, including Agent, Chat, Evaluator, Function, LLM call, Root trace, Task, Tool, and Workflow.

Examples:

  • Show Tool and Task spans to debug a failed tool path.
  • Show LLM call and Chat spans to inspect prompt and response behavior.
  • Show Agent and Workflow spans to understand orchestration and handoffs.

Filtering changes what is visible in the hierarchy; it does not change the stored trace.

Respan span-type picker with search and checkboxes for agent, chat, custom, evaluator, function, LLM call, root trace, task, tool, and workflow spans.
Use span types to remove visual noise from a large agent trace.
7

Inspect the suspicious span

Select a span in the hierarchy, then use:

  • Span to read the exact input and output captured for that operation.
  • Metadata to inspect its identifiers, model and provider context, and attached custom properties.
  • The content-format selector to switch among the representations available for that span.

For a model call, compare the actual input with what the application intended to send. For a tool call, compare the tool arguments with its returned value. Then move one level up the hierarchy and verify how the parent used that output.

Respan Span tab in Pretty mode showing the selected span's user input and assistant output.
The span details show what one operation received and returned.
8

Confirm the cause before changing the application

Work from the earliest span that contains incorrect data, not merely the last span that displays the failure.

SymptomEvidence to look for
Wrong answerThe first prompt, retrieval result, or tool output that became incorrect
High latencyLong duration bars, repeated calls, or sequential work that could run in parallel
High costLLM spans with high input/output tokens, repeated model calls, or agent loops
ErrorThe earliest failed span, its input/output, and the parent span that invoked it

Once the evidence supports a cause, copy the trace identifier into the engineering issue and record the time range, saved view, failing span, and expected behavior. This gives another investigator enough context to reproduce the finding.

Follow a session with Threads

Use Logs → Threads when the investigation spans more than one trace, such as a multi-turn conversation or long-running customer workflow. A thread is a time-ordered group of spans that share one thread identifier; the group can include spans from one or more traces.

1

Open Threads and find the session

Open the Threads page, choose a time range, and filter or sort the table to find the thread. Useful columns include Thread ID, System, User, Cost, TTFT, Total, and Status.

Respan Threads table over the last month with columns for time, thread ID, system and user content, cost, time to first token, total, and status.
Threads group related activity into longer sessions.
2

Inspect the thread context

Select a row to open the thread detail panel. Review the Thread ID, Customer ID, cache status, and custom properties to confirm that this is the reported session. Expand Deployment when you need the available deployment context.

Respan thread detail panel showing thread ID, customer ID, cache status, custom properties, a collapsed Deployment section, and the selected thread in the table.
Thread details expose stable identifiers and application context for the session.
3

Return to the traces in that thread

Copy the Thread ID, open Logs → Traces, and filter by that value. Order the traces by time, then open the run where the behavior changed and continue through its span hierarchy.

This preserves the distinction between the levels: the thread supplies session context, the trace explains one run, and the span shows one operation.

Troubleshooting trace data

No traces appear

Confirm the project and time range, temporarily clear filters, and send a test request. If the request is not traced, complete the Tracing quickstart.

A run appears as separate flat traces

Individual model calls can appear separately when the application does not create or propagate a parent workflow span. Add a framework instrumentor or group the operations with @workflow and @task.

Input or output is missing

Check whether content logging was disabled, whether the selected span recorded messages, or whether the record is outside your retention window. See Retention and export.

The trace is difficult to find again

Attach stable fields such as a customer, thread, workflow, and environment as trace metadata, then filter on them. See Metadata and tags.

Continue from one trace

One trace explains one run. Use the next workflow that matches your goal: