Traces
End-to-end visibility into agent execution.
Read traces in the dashboard, or with an API key through the MCP server
What runs today: traces are captured, stored, and shown in the dashboard. Everything on this page about what a trace is, and how to read one in the product, is current.
With an API key: the MCP server lists, filters and reads traces with a Secret key. The REST API has no route for that. The REST API reference lists the routes that an API key can reach.
A trace represents a complete execution from request to response.
Trace Structure
Trace (trace_id: abc123)
├── Root Span (agent: orchestrator)
│ ├── LLM Span (model: gpt-4o, 234ms)
│ ├── Tool Span (tool: search, 1200ms)
│ └── Agent Span (agent: researcher)
│ ├── LLM Span (model: gpt-4o-mini, 156ms)
│ └── Tool Span (tool: fetch, 89ms)
└── Metadata
├── session_id
└── environment
Trace Attributes
| Attribute | Type | Description |
|---|---|---|
trace_id | string | Unique 32-char hex identifier |
start_time | timestamp | Trace start time |
end_time | timestamp | Trace end time |
duration_ms | number | Total duration in milliseconds |
has_errors | boolean | true when a span of the trace has an error |
span_count | number | Total spans in trace |
total_tokens | number | Sum of all LLM tokens |
total_cost_usd | number | Sum of all LLM costs |
agent_names | list | Names of the agents in the trace |
error_codes | list | Error messages that the trace lists |
Viewing Traces
Trace List
The trace list shows traces with key metrics. It starts with the Last 24 hours. The time range menu has the presets Last hour, Last 24 hours, Last 7 days and Last 30 days. There is no All time option. The list shows 50 rows at a time: click Load 50 more for the next rows.
The list does not update by itself. Click Refresh to reload the list, the strip above it and the footer.
A strip above the list shows Traces, With errors, Duration p50 and Cost, with a small histogram.
The list has up to 22 columns. Ten are on by default:
| Column | Description |
|---|---|
| Status | Status of the trace. Always on |
| Name | Name of the root span. Click to view details. Always on |
| Input, Output | The input and the output of the trace |
| Errors | Error badge, when the trace has errors |
| Start time | When the trace occurred |
| Duration | Total latency |
| Spans | Number of spans |
| Tokens | Total tokens |
| Cost | Total USD cost |
The other columns are Environment, Session, User, Release, Model, Prompt, Tags, Agents, Tools, Category, Scores and Trace id. Choose columns in the column chooser (Columns N of 22). The chooser also has Reset columns and a Density choice (Compact or Comfortable). When a project has a stored prompt, Prompt is on by default as well. Your choice stays in your browser, and the page address carries it as cols.
Click a row to open a preview panel beside the list. In the panel, J goes to the next trace, K goes to the previous trace, and Esc closes the panel. J and K do nothing on the full trace page.
Filtering
Filter the trace list with the filter bar, the Presets menu and the Views menu. The filter bar has a query language: error:true model:gpt-4o duration>2s shows the traces that have an error, use gpt-4o and take more than 2 seconds. To find traces by error code, use error_code:, for example error_code:TOOL.EXECUTION.TIMEOUT. The terms, the keys, the free text search and the saved views are described under Filtering and Search.
Trace Detail View
Waterfall
Click any trace to see the full execution waterfall with nested spans, timing, and LLM details:
The waterfall shows:
- Span hierarchy with parent-child nesting
- Parallel execution paths
- Timing relationships
- Per-span details (model, tokens, cost) in the detail panel
The Span Waterfall tab has a Conversation | Tree switch. The page opens in Conversation when an LLM span has a user message and an assistant output, and in Tree otherwise. Press Cmd+F (Ctrl+F on Windows and Linux) while the trace view has focus to search in the trace.
Timeline and Raw JSON
The trace page has three tabs: Span Waterfall, Timeline and Raw JSON.
Span Detail
Select a span to open its detail panel. The tabs depend on the kind of span:
| Span | Tabs |
|---|---|
| LLM call | Messages, Parameters, Attributes, Events, Exceptions, Raw |
| Tool call | Input / Output, Attributes, Events, Exceptions, Raw |
| Other | Input / Output (only when the span has input or output), Attributes, Events, Exceptions, Raw |
Events and Exceptions show only when the span has at least one. The panel opens on Messages for an LLM call and on Input / Output for a tool call. In Messages, each block has a Formatted | Raw switch. The buttons OpenAI body and Anthropic body copy the whole request as JSON.
On a span that carries a prompt, a chip after the model badge shows the prompt as name@version. For a stored version the chip links to that version, and a Calls link opens the trace list filtered by the prompt.
Actions on a trace
- Add to dataset (trace header and each span): adds the trace as a case of a dataset. It needs the member role or higher. The first user message is the input, and the answer of the trace is kept as evidence. The expected answer is pending.
- Add score (in the Scores block, or press S): records a score on this trace, on a span or on the session. You give a name, a value (a number, a label of up to 256 characters, or true or false), a kind (
annotationis the default) and an optional comment. See Scores. - Copy link, and the Download menu with Download trace JSON (and Download span JSON when a span is selected).
- Behaviour chips: the page shows one chip for each behaviour detection stored for the trace (the first 20). Each chip links to the release page for that counter.
While a trace is still receiving spans, the page shows the badge receiving and reads new spans every 5 seconds.
Content Privacy
Prompt and completion content, and the arguments of tool calls, are on by default (Python 0.7.0 and npm 0.10.0 and later). To turn it off in your code, pass trace_content=False to risicare.init() (npm: traceContent: false) or set RISICARE_TRACE_CONTENT=false. Owners and admins can also turn it off for a whole project with the Content capture switch in Settings → General. Risicare always removes credentials and personal data from stored content. With the SDK switch off, the SDK also withholds the text of an error.
Exporting Traces
API Export
The REST API has no export route for an API key. The MCP server reads traces with a Secret key: list_traces and get_trace.
Dashboard Export
From the trace list, export the traces as CSV or JSON. An export holds the first 100 traces of the time range and the filter. You cannot select individual traces to export. To save one trace, use Download trace JSON on its page.
Trace Sampling
For high-volume applications:
risicare.init(
sample_rate=0.1 # Capture 10% of traces
)Sampling is deterministic by trace_id for consistency.