Cloudflare Agent Traces: Production Checklist
Design Cloudflare agent traces with stable identities, safe payload capture, approval timing, and failure checks before connecting production traffic.
An agent can return a useful answer after making two unnecessary model calls and repeating a tool action. A request log that records only HTTP status and total duration will miss both problems. Cloudflare Agent Traces adds an execution view for this kind of investigation. The useful production question is whether the trace connects the model, tool, and approval events to the same agent turn without retaining data you did not intend to collect.
This guide defines that instrumentation boundary. It is based on Cloudflare’s documentation checked on November 14, 2026; it is a deployment review, not a report of a workload benchmark or a tested installation.
Key takeaway
- Enable tracing and check the resulting agent spans before increasing traffic.
- Keep the agent name stable; separate it from instance and conversation identity.
- Treat captured messages and tool arguments as retained application data.
- Keep durable business outcomes outside the trace so sampling cannot erase them.
Start with the question the trace must answer
Choose one concrete incident before choosing a dashboard. For a booking agent, the question might be: why did a turn that should check availability also attempt a reservation? That investigation needs the model decision, the selected tool, the authorization boundary, and the final application outcome. A large collection of generic log lines is less useful than a small, consistently connected record of those events.
Cloudflare’s August 4 announcement distinguishes session replay from the trace waterfall. Replay helps inspect conversation content; the waterfall shows execution timing and infrastructure relationships. Those views answer different questions. A plausible final answer in replay does not establish that a tool completed, and a successful span does not establish that the returned answer was appropriate.
Cloudflare’s announcement page, captured November 14, 2026. It establishes the feature and its two inspection views; this is vendor documentation, not a trace from our deployment.
Write down the success condition in application terms. “Reservation confirmed exactly once” is useful. “All spans green” is insufficient because it omits the user-visible result. The trace should help explain how the application reached that condition, while the application database remains the authority on whether it did.
Enable tracing, then verify coverage
The Cloudflare tracing guide documents this Wrangler configuration:
[observability]
enabled = true
[observability.traces]
enabled = trueConfiguration is the beginning of verification. Deploy a controlled request with harmless data and inspect whether the expected turn, model call, and tool operation appear together. Record the exact package versions and the chosen integration. A framework integration and a custom harness can produce different coverage even when the runtime setting is identical.
Do not add an unverified wrapper simply because a nearby example uses the same model provider. Follow the setup for the framework that actually executes the call. If your application delegates work to a separate service, establish how that service’s request identifier is recorded before assuming the visual parent-child relationship will continue across the boundary.
The official tracing guide captured November 14, 2026. Use its current framework setup as the configuration source; the screenshot is not evidence that tracing is enabled on your account.
A practical coverage review compares a known sequence of actions with the events visible in the trace. Send one request that calls no tool, one that calls a read-only tool, and one that stops at approval. Missing branches are more informative than a single successful demonstration. Keep the test inputs and expected actions alongside the deployment configuration so a dependency upgrade can repeat the same review.
Keep three kinds of identity separate
Cloudflare distinguishes the logical agent name, its stable instance identifier, and the conversation identifier. A name such as booking-agent describes an implementation. An instance identifies a resource. A conversation identifies the session being inspected. The documentation warns against deriving the agent name from each request or user.
For your own data model, add a separate application run identifier when a workflow can span multiple turns. That is a proposed application convention, not an extra Cloudflare field guaranteed by every integration. Store the relationship in a server-controlled record and decide which safe identifier belongs in telemetry.
| Identity | Question it answers | Mistake to avoid |
|---|---|---|
| Logical agent | Which implementation is failing? | Creating a different name for every request |
| Instance or resource | Which running resource owns this work? | Reusing one label for unrelated environments |
| Conversation | Which interaction should be inspected? | Putting the user’s message in the identifier |
| Application run | Which business operation joins these turns? | Assuming one HTTP request equals one operation |
Identity design affects incident response. If production and staging share indistinguishable names, a filter may combine experiments with customer traffic. If identifiers contain email addresses, every export becomes another place those addresses are retained. Prefer opaque references that can be resolved through a controlled application lookup when an authorized investigator needs more context.
Approval timing needs an application clock
The tracing documentation describes approval spans as events within a Worker invocation. They do not measure the entire human wait across separate invocations. This matters when an operator reads a short span and concludes that approval took milliseconds, even though the customer left the approval screen open for hours.
Record approval_requested_at and approval_resolved_at in the application record if that elapsed time is a product metric. Also record the decision and the identity allowed to make it. Calculate user waiting time from those durable timestamps. Use the trace to diagnose the processing around each event, including the time spent validating the decision or resuming the operation.
The distinction keeps two separate service objectives honest: machine execution latency and human workflow duration. Combining them into one number makes it hard to tell whether to optimize an API call, improve the approval screen, or change a timeout policy. A denied or expired approval is also a meaningful outcome; it should not disappear merely because no tool was executed.
Payload capture is a retention decision
A trace can reveal credentials in a tool result, personal data in an argument, or a sensitive passage in a user message. Read the payload defaults for the exact integration. The tracing guide documents different defaults across integrations and notes that stored payloads can be truncated. A trace is consequently neither a universally empty metadata record nor a guaranteed complete conversation archive.
Start with a field inventory. For every field, record why it is necessary, who can read it, and how long it may remain. Use a harmless marker to check whether a value reaches the tracing view and any configured export. This is more useful than assuming that a field named “context” is automatically safe.
Avoid solving every debugging problem by turning on full payload capture. Retaining model messages can help reconstruct a failure, but it increases the information exposed to operators and downstream systems. For many failures, a tool name, validation result, duration, and opaque lookup key are sufficient. When the full content is necessary, scope the capture deliberately and document its handling.
Pair traces with structured operational events
Cloudflare’s observability overview places tracing alongside other operational information. Use those surfaces according to the question being investigated: execution relationships belong in spans, while a searchable application event can record that a state transition occurred.
Cloudflare’s observability overview, captured November 14, 2026. It provides the broader operational context; it does not prove any particular application event is collected automatically.
For a consequential tool action, persist a business record before relying on an observability view. Record the proposed action, approval state, idempotency key, and reconciled result. A trace link is helpful context on that record. It should not be its only storage location.
This is especially important after a timeout. The application may not know whether the downstream system accepted the request. Retrying the tool without checking its durable state can repeat the action. Instrument the uncertainty explicitly: “result pending reconciliation” tells an operator more than recording a generic failure and starting again.
A focused preproduction review
Use this proposed test matrix with a non-destructive fixture. These are acceptance checks to run in your environment, not results observed for this article.
| Scenario | Inspect in telemetry | Confirm outside telemetry |
|---|---|---|
| One read-only tool succeeds | Turn, model, and tool relationship | Expected answer and returned data |
| Tool rejects invalid input | Validation outcome and stopped branch | No external action occurred |
| Approval is delayed | Separate processing events | Durable requested and resolved timestamps |
| Provider times out | Attempt and error context | Unknown outcome is reconciled before retry |
| User repeats the request | Two distinguishable attempts | Business idempotency behavior |
| Payload contains a harmless marker | Intended capture or omission | Export and access policy match the decision |
Assign an owner to each failed check. “Improve observability later” is too broad to be actionable. A missing tool span belongs with the integration owner; an unprotected approval transition belongs with the application owner; unclear data retention needs a concrete retention decision. Separating those issues makes the deployment review shorter and the fixes easier to verify.
Where model selection fits
Tracing describes execution; it does not choose the model or authorize a tool. If the next task is comparing model capabilities for the agent, the SandBase task directory is a separate discovery surface. This article does not claim that SandBase hosts Cloudflare Agent Traces or automatically joins its telemetry.
For the application-level distinction between logs, spans, and debugging evidence, see agent observability: logging, tracing, and debugging. Keep the model route, instrumentation configuration, and business state independently reviewable. That is what lets a team change one layer without losing the ability to explain the others.
Questions to settle before release
Can a successful trace prove a business action completed? No. Check the authoritative application or downstream record and use the trace to explain the sequence.
Should every user get a new agent name? No. Keep the implementation name stable and use the appropriate instance and conversation identity.
Is session replay a compliance archive? Do not treat it as one. The documented capture and truncation limits require a separately designed record if completeness is necessary.
The release decision should come down to a small set of demonstrated behaviors: the expected paths are visible, identifiers remain meaningful, retained data is intentional, and uncertain tool outcomes can be reconciled. More spans are useful only when they make those behaviors easier to verify.
Found this useful? Share it