Cloudflare

Trace AI agents turn by turn with Cloudflare's new tracing spans

Cloudflare's new agent tracing brings welcome visibility to AI-driven workflows, adding spans for agent invocations, model calls, tool runs, and approvals directly into existing Workers traces.

4 min readInfoQ
Trace AI agents turn by turn with Cloudflare's new tracing spans

Cloudflare's new agent tracing is a welcome step toward making AI-driven workflows observable, but the fine print reveals a tool that is still very much a work in progress. The company has added spans for agent invocations, model calls, tool runs, and approvals to its existing Workers traces, which means developers can finally replay sessions turn by turn. That is genuinely useful. Watching an agent reason through a task, call a tool, and then adjust course is the kind of visibility that separates debugging from guesswork. But the docs are refreshingly honest: traces are not lossless, and payloads may be truncated. That caveat matters more than the feature itself. If you are building production agents, you need to know that what you are seeing might not be the whole story.

The uneven payload recording defaults across frameworks only deepen that concern. Cloudflare has chosen different defaults depending on the framework, which means the same agent logic could produce rich, detailed traces in one environment and sparse, incomplete ones in another. That is not a dealbreaker, but it is a trap for teams that assume consistency. You cannot compare performance or debug effectively when the data you are collecting is shaped by the framework's defaults rather than your own intent. This is where we would tell a reader to pause: if you adopt this, set explicit payload policies early and test them across every framework you use. Do not let the default become your standard.

The bigger strategic question is the billing change. From October 1, 2026, every span counts as a billable event. That is not an arbitrary deadline; it is a signal that Cloudflare is turning observability into a metered resource. For small teams or early-stage projects, this could introduce a cost curve that is hard to predict. You might start with light usage, only to see your bill climb as your agents grow more complex and generate more spans. This is not unique to Cloudflare, of course. Cloudflare's Blog Finds Performance Gains with EmDash, Its New CMS shows the company is comfortable making its own tools more efficient, and Monitor Cypress Tests with Grafana: Persistent Observability for Your Data reminds us that observability costs are a growing concern across the industry. But the October 2026 date gives you time. Use it to instrument your agents, measure your span volume, and decide whether the visibility is worth the price. Also worth watching is how this interacts with the broader shift toward Scale AWS Server Deployments Effortlessly with Stateless Model Context Protocol, where stateless protocols are becoming the norm for AI workloads.

Our take is straightforward: agent tracing is a meaningful step forward, but it is not a silver bullet. The truncation limits and billing changes are not footnotes; they are the real product. The teams that will benefit most are those that treat this as a starting point for building their own observability discipline, not as a finish line. The concrete detail to watch is how Cloudflare handles the transition to paid spans. If they offer generous free tier limits or transparent cost controls, this could be a genuine asset. If not, you may find yourself paying for the privilege of debugging code that should have been simpler to trace in the first place. Plan accordingly, and set your expectations now rather than after the billing cycle hits.

From InfoQ

Cloudflare launched agent tracing, adding spans for agent invocations, model calls, tool runs, and approvals to existing Workers traces. Sessions replay turn by turn, though the docs warn traces are not lossless and payloads may be truncated. Payload recording defaults differ by framework, and from October 1, 2026 every span counts as a billable event.

Read the original at InfoQ