Quick answer
Cloudflare Agents observability adds agent-aware context to Workers tracing. The Agents view can connect a turn to model calls, tool execution, approval events, supported subagents, token metadata, and the Workers resources used underneath. Session replay shows captured context; a trace shows the execution waterfall.
It does not prove that the final answer was correct. Use traces to find what happened, then evaluate the result against a versioned test or human review.
What each view answers
| View | Use it to answer |
|---|---|
| Agents list | Which observed agents, runs, sessions, and instances are active? |
| Session replay | What recorded instructions, messages, tool arguments, results, and response shaped the turn? |
| Agent trace | Where did latency occur, which model or tool ran, and how did subagent work nest? |
| Workers trace | Which fetch, D1, KV, Durable Object, service-binding, or other infrastructure span ran underneath? |
Start with replay for context and decision errors. Start with the trace for latency, retries, failures, and resource correlation.
Enable and validate tracing
- Enable Workers tracing in
wrangler.jsonc. - Use the documented Think, Flue, or AI SDK integration; custom harnesses can emit custom spans following OpenTelemetry Generative AI conventions.
- Run one known-success and one known-failure turn.
- Confirm agent, conversation, turn, model, tool, approval, and subagent fields appear where your harness supports them.
- Decide whether message and tool payload recording is appropriate for the data class.
- Configure OTLP export only after checking destination access, redaction, retention, and cost.
For implementation details, use the AI SDK and OpenTelemetry setup guide. For failure triage, use the tool-call debugging guide.
Privacy and cost gates
Cloudflare says storeMessages and storeTools control payload capture for its documented integrations. Turn payload recording off when prompts, tool inputs, or tool results may contain secrets, personal information, or other sensitive data. Review the session replay privacy guide before enabling it broadly.
Every span counts as an observability event, including Worker-level spans not shown in the Agents view. Check the pricing and retention guide before extrapolating from a small test.
Frequently asked questions
What does Cloudflare agent tracing show?
Cloudflare documents agent invocations, model calls, tool execution, approval events, supported subagent calls, reported token usage, and related Workers infrastructure spans.
Is session replay a re-execution?
No. It is a view of recorded data. Changing the current agent or tool does not change what was captured for the earlier turn.
Can traces be exported?
Yes. Cloudflare documents export to supported OTLP-compatible destinations through a configured observability destination.
Official sources
- Cloudflare: Introducing Cloudflare Agents
- Cloudflare agent tracing documentation
- Cloudflare OpenTelemetry export documentation
Source check: August 6, 2026. Verify beta status, supported harnesses, captured fields, pricing, retention, and export behavior before production use.