Agent Trace Viewer
Paste an OTLP/JSON trace export, a JSON array of spans, or Python ConsoleSpanExporter output from an AI agent. The viewer builds the span tree with durations and reads the OpenTelemetry GenAI semantic conventions: gen_ai.operation.name values such as invoke_agent, chat and execute_tool, the model, gen_ai.usage.input_tokens and output_tokens, the tool name and call ID, and error status. Per trace it totals tokens without double-counting agent spans, the wall-clock time spent in model and tool calls, and tool calls repeated under one call ID. Deprecated prompt_tokens and completion_tokens are totalled separately. Orphaned spans, cycles and clock skew are flagged, prompt and completion content stays hidden until you show it, and everything runs in your browser.
Agent Trace Viewer
Client-Side Only
Read in this browser tab. The trace is parsed and totalled by fixed rules from the OpenTelemetry GenAI semantic conventions (b31e9e8). Nothing is uploaded, and prompt and completion content stays hidden until you choose to show it.
trace fa3a906b2b2fba3594c67ac7f6da9d0c · ci-triage-agent
Totals for this trace
- Duration
- 8.55 s
- 8 spans, 1 root
- Model calls
- 3
- 3.05 s, 36% of the trace
- Tool calls
- 4
- 5.50 s, 64% of the trace
- Errors
- 2
- Input tokens
- 54,325
- from 3 spans
- Output tokens
- 106
- Agent invocations
- 1
- Models
- stub-chat-1-2026-09
- Note: "invoke_agent ci-triage" reports 54,325 input and 106 output tokens, the same as the spans under it. It is not added again.
Repeated tool calls (1)
- fetch_ci_log (call call_fetch_log_1): 3 attempts, 2 failed, 5.38 s in total, 63% of the trace
Timeline by parent
Select a span for its attributes. A ? after the operation means it was read from the span name.
- invoke_agent
invoke_agent ci-triage
ci-triage · 54,325 in / 106 out (already counted below)
8.55 s- Starts at
- +0 ms
- Kind
- internal
- Span ID
- 0565295db1ae8cc3
- Parent
- none (root)
- Status
- unset
- Service
- ci-triage-agent
- Provider
- local.stub
- Requested model
- stub-chat-1
Attributes of invoke_agent ci-triage gen_ai.operation.name invoke_agent gen_ai.agent.name ci-triage gen_ai.provider.name local.stub gen_ai.request.model stub-chat-1 gen_ai.conversation.id conv_run4812 gen_ai.usage.input_tokens 54325 gen_ai.usage.output_tokens 106 - chat
chat stub-chat-1
stub-chat-1-2026-09 · 49 in / 29 out
623 ms- Starts at
- +0 ms
- Kind
- client
- Span ID
- ed446108854beee1
- Parent
- 0565295db1ae8cc3
- Status
- unset
- Service
- ci-triage-agent
- Provider
- local.stub
- Requested model
- stub-chat-1
- Response model
- stub-chat-1-2026-09
- Finish reasons
- tool_calls
Attributes of chat stub-chat-1 gen_ai.operation.name chat gen_ai.provider.name local.stub gen_ai.request.model stub-chat-1 gen_ai.response.model stub-chat-1-2026-09 gen_ai.response.id resp_1 gen_ai.usage.input_tokens 49 gen_ai.usage.output_tokens 29 gen_ai.response.finish_reasons ["tool_calls"] gen_ai.system_instructions content hidden (96 characters) gen_ai.input.messages content hidden (98 characters) gen_ai.output.messages content hidden (177 characters) - execute_tool
execute_tool fetch_ci_log
fetch_ci_log · call_fetch_log_1
2.51 serror- Starts at
- +623 ms
- Kind
- internal
- Span ID
- edcfdf6b91bb2454
- Parent
- 0565295db1ae8cc3
- Status
- error: fetch aborted after 2500 ms (attempt 1)
- error.type
- timeout
- Service
- ci-triage-agent
Attributes of execute_tool fetch_ci_log gen_ai.operation.name execute_tool gen_ai.tool.name fetch_ci_log gen_ai.tool.type function gen_ai.tool.call.id call_fetch_log_1 gen_ai.agent.name ci-triage gen_ai.tool.call.arguments content hidden (36 characters) error.type timeout - execute_tool
execute_tool fetch_ci_log
fetch_ci_log · call_fetch_log_1
2.50 serror- Starts at
- +3.13 s
- Kind
- internal
- Span ID
- 8ad3de71be33c689
- Parent
- 0565295db1ae8cc3
- Status
- error: fetch aborted after 2500 ms (attempt 2)
- error.type
- timeout
- Service
- ci-triage-agent
Attributes of execute_tool fetch_ci_log gen_ai.operation.name execute_tool gen_ai.tool.name fetch_ci_log gen_ai.tool.type function gen_ai.tool.call.id call_fetch_log_1 gen_ai.agent.name ci-triage gen_ai.tool.call.arguments content hidden (36 characters) error.type timeout - execute_tool
execute_tool fetch_ci_log
fetch_ci_log · call_fetch_log_1
372 ms- Starts at
- +5.63 s
- Kind
- internal
- Span ID
- e7b0de9f51c7c811
- Parent
- 0565295db1ae8cc3
- Status
- unset
- Service
- ci-triage-agent
Attributes of execute_tool fetch_ci_log gen_ai.operation.name execute_tool gen_ai.tool.name fetch_ci_log gen_ai.tool.type function gen_ai.tool.call.id call_fetch_log_1 gen_ai.agent.name ci-triage gen_ai.tool.call.arguments content hidden (36 characters) gen_ai.tool.call.result content hidden (192 characters) - chat
chat stub-chat-1
stub-chat-1-2026-09 · 27,099 in / 32 out
1.48 s- Starts at
- +6.00 s
- Kind
- client
- Span ID
- 88ab55ba7a193996
- Parent
- 0565295db1ae8cc3
- Status
- unset
- Service
- ci-triage-agent
- Provider
- local.stub
- Requested model
- stub-chat-1
- Response model
- stub-chat-1-2026-09
- Finish reasons
- tool_calls
Attributes of chat stub-chat-1 gen_ai.operation.name chat gen_ai.provider.name local.stub gen_ai.request.model stub-chat-1 gen_ai.response.model stub-chat-1-2026-09 gen_ai.response.id resp_2 gen_ai.usage.input_tokens 27099 gen_ai.usage.output_tokens 32 gen_ai.response.finish_reasons ["tool_calls"] gen_ai.system_instructions content hidden (96 characters) gen_ai.input.messages content hidden (532 characters) gen_ai.output.messages content hidden (189 characters) - execute_tool
execute_tool search_known_flakes
search_known_flakes · call_flakes_2
117 ms- Starts at
- +7.49 s
- Kind
- internal
- Span ID
- 0ef71bd593815df9
- Parent
- 0565295db1ae8cc3
- Status
- unset
- Service
- ci-triage-agent
Attributes of execute_tool search_known_flakes gen_ai.operation.name execute_tool gen_ai.tool.name search_known_flakes gen_ai.tool.type function gen_ai.tool.call.id call_flakes_2 gen_ai.agent.name ci-triage gen_ai.tool.call.arguments content hidden (44 characters) gen_ai.tool.call.result content hidden (53 characters) - chat
chat stub-chat-1
stub-chat-1-2026-09 · 27,177 in / 45 out
943 ms- Starts at
- +7.60 s
- Kind
- client
- Span ID
- 73069ddb24f22189
- Parent
- 0565295db1ae8cc3
- Status
- unset
- Service
- ci-triage-agent
- Provider
- local.stub
- Requested model
- stub-chat-1
- Response model
- stub-chat-1-2026-09
- Finish reasons
- stop
Attributes of chat stub-chat-1 gen_ai.operation.name chat gen_ai.provider.name local.stub gen_ai.request.model stub-chat-1 gen_ai.response.model stub-chat-1-2026-09 gen_ai.response.id resp_3 gen_ai.usage.input_tokens 27177 gen_ai.usage.output_tokens 45 gen_ai.response.finish_reasons ["stop"] gen_ai.system_instructions content hidden (96 characters) gen_ai.input.messages content hidden (845 characters) gen_ai.output.messages content hidden (233 characters)
Frequently Asked Questions(click to expand)
Why is the agent span's token count not added to the total?
Agent frameworks often put gen_ai.usage.input_tokens on the invoke_agent span as well as on each model call under it, and the conventions do not say whether the agent's number is a sum. Adding both would count the same tokens twice, so a span's tokens count only when nothing beneath it reports tokens. When the two disagree the viewer says so.
What happens to gen_ai.usage.prompt_tokens?
It and completion_tokens are deprecated, replaced by input_tokens and output_tokens. Spans that still use them get their own labelled total, because an export mixing old and new instrumentation can report the same call under both names.
How stable are these attribute names?
Every gen_ai.* attribute and operation name is at Development stability, and the conventions moved to their own repository in 2026. Names can still change; the viewer is pinned to commit b31e9e8.
Why is a span shown as a root with a warning?
Its parent is not in the input, usually because the parent belongs to another service's export. Cycles and duplicate IDs are broken the same way, and a child that starts before its parent is flagged as clock skew rather than drawn as if it were nested.
Where do I go after finding a slow tool call?
A tool that times out and is retried is an API-testing problem. The guide to testing API idempotency, retries and timeouts covers proving a retry is safe. If the agent called the tool with the wrong arguments, the MCP Tool Schema Checker finds the definition problems behind it, and the LLM Eval Test-Case Builder turns the run into a regression case.