Understanding Cloudflare’s Revolutionary Agent Tracing
Cloudflare has recently launched agent tracing as part of its innovative Cloudflare Agents platform. This dashboard feature consolidates deployed agent sessions into one intuitive interface, allowing developers to better understand agent behavior. The release enhances existing Workers tracing by incorporating agent-level spans, adding depth to application telemetry. With a notable pricing update, tracing will remain free during its beta phase and transition to a paid model from October 1, 2026, falling under Workers Observability pricing.
Addressing the Underlying Challenges
One of the most significant challenges in application development is that an agent can return an HTTP 200 status while still failing to effectively perform its task. Factors like choosing the wrong tool, passing outdated context to a subagent, or getting stuck in a retry loop can lead to issues not reflected in basic API requests or database queries. Agent tracing aims to illuminate these hidden failures by enhancing visibility into agent behavior.
Enhancements to Existing Tracing
Previously, Workers tracing was limited to covering fetch calls, KV reads, and D1 queries. However, with the introduction of agent tracing, developers can now view spans for various agent activities, including agent invocations, model calls, tool execution, and approvals. This results in a more comprehensive tracing mechanism. For instance, a trace might look like this:
invoke_agent {agent class}
├── chat {model}
└── execute_tool {tool}
└── tool_approval {tool}
This hierarchical structure allows developers to visualize the sequence of actions taken by both parent agents and their subagents, thereby delivering a complete picture of operations within a single waterfall view.
Real-Time Feedback from Developers
Feedback from the developer community has been overwhelmingly positive. Mykyta Pavlenko’s response on social media highlights the excitement surrounding the clear trace waterfall, which can significantly aid debugging. Seeing the model call positioned directly above an erroneous tool argument provides invaluable context for troubleshooting.
Important Considerations for Approvals
One point of caution comes with the approval span. While it captures lifecycle events within a Worker invocation, it doesn’t account for the latency introduced by human interaction. Therefore, the span timestamps do not reflect the waiting time for a user to provide feedback. This limitation can be crucial for teams focused on optimizing approval workflows.
Session Replay for Holistic Insights
In addition to tracing, Cloudflare introduces session replay, which reconstructs the recorded conversation as an integrated view of messages, reasoning, tool calls, and subagent activities. It’s important to note that session replay captures recorded data rather than executing the agent again, ensuring that developers can review past interactions comprehensively.
Payload Recording and Privacy Risks
When it comes to payload recording, teams need to exercise caution due to inconsistent default behaviors across different tools. For example, the Think framework doesn’t store message or tool payloads unless explicitly configured, while the Flue framework defaults to storing these elements. This discrepancy can pose privacy risks, especially when sensitive data is involved, making it crucial for teams to configure their setups diligently to safeguard against unwanted data exposure.
Limitations and Setup Varieties
Understanding the limitations of agent tracing is vital for teams employing this feature. Not only does Cloudflare clarify that traces aren’t a comprehensive or lossless record of conversations, but they also mention that spans may truncate lengthy messages or results. Moreover, session replay currently does not support displaying images, which may impede some use cases.
Setup processes vary depending on the technology stack. Automatic instrumentations are available for Think and Flue v2 or later versions, while direct AI SDK calls necessitate the use of the wrapAISDK() wrapper. Custom harnesses can utilize the Workers custom spans API; Cloudflare is actively working to support OpenTelemetry API standards for easier integrations in the future.
Navigating the Pricing Structure
The pricing model is an essential element that teams need to understand thoroughly. Notably, even if the Agents view showcases fewer spans, each span still counts as one observability event, including those arising from SDK internals or other Worker-level operations. Under Workers Free, teams are allocated 200,000 events per day with a short three-day retention period. On the other hand, Workers Paid provides 20 million events monthly with a seven-day retention span, charged at $0.60 per additional million events. Teams aiming to analyze long-term patterns might find this retention period less than ideal.
Industry Trends: Agent Telemetry Necessity
This release aligns with a broader trend seen among tech vendors—a recognition that agent runtimes require their dedicated telemetry layers. Recent upgrades, such as Microsoft’s Agent Framework with built-in OpenTelemetry, are also highlighting this trend. Cloudflare joins the conversation by emphasizing that infrastructure spans alone fail to convey the complete story of an agent’s actions.
A Forward-Thinking Vision
Cloudflare positions agent tracing as a foundational step toward creating self-improving agents, where structured trace data will feed into evaluations and the agent development lifecycle. While the current capabilities focus on visibility—monitoring which model was used, how many tokens were invoked, and tool selections—the organization’s roadmap indicates a future rich with enhancements aimed at improving agent performance and reliability.
Inspired by: Source
- Addressing the Underlying Challenges
- Enhancements to Existing Tracing
- Real-Time Feedback from Developers
- Important Considerations for Approvals
- Session Replay for Holistic Insights
- Payload Recording and Privacy Risks
- Limitations and Setup Varieties
- Navigating the Pricing Structure
- Industry Trends: Agent Telemetry Necessity
- A Forward-Thinking Vision

