Quick answer
To enable Cloudflare agent tracing, first enable Workers traces in wrangler.jsonc, then instrument the agent through the current Think, Flue, AI SDK, or custom-harness path. Cloudflare documents wrapAISDK() for AI SDK and custom spans aligned with OpenTelemetry Generative AI conventions for other harnesses.
{
"observability": {
"traces": {
"enabled": true
}
}
}
Treat that configuration as the start of validation, not proof that every agent operation is captured.
Choose the integration path
| Stack | Current documented path | Acceptance check |
|---|---|---|
| Think or Flue | Use the framework tracing integration | Agent, conversation, turn, model, and tool context appears |
| AI SDK | Use Cloudflare’s current wrapAISDK() adapter | Model, token, tool, and turn spans correlate correctly |
| Custom harness | Emit custom spans using OpenTelemetry Generative AI conventions | Stable agent and conversation identifiers group into the intended sessions |
Cloudflare says direct acceptance of standard OpenTelemetry API telemetry inside Workers is future work. Do not describe that inbound path as generally available until the live documentation says it is.
Validation sequence
- Pin the current framework, adapter, Workers runtime, and configuration revision.
- Trace a small deterministic success case with one model and one tool.
- Trace a controlled tool error, timeout, retry, and approval pause.
- Compare the Agents view with the full Workers trace.
- Check whether payload capture is on and whether sensitive fields appear.
- Confirm sampling, event volume, retention, and the alert path.
- Export a bounded sample to the intended OTLP destination and reconcile trace IDs.
Use the observability overview for view selection and the Workers comparison for span-layer boundaries.
Payload and export controls
For documented integrations, storeMessages and storeTools determine whether message and tool payloads are captured. Cloudflare explicitly recommends turning payload recording off when data may contain personal information, secrets, or other sensitive material.
OTLP export changes the data boundary. Review destination credentials, tenant isolation, redaction, sampling, retention, incident access, and deletion procedures before enabling it.
Frequently asked questions
How do I enable tracing?
Enable Workers tracing, then apply the current integration for the selected stack. Test actual spans before relying on the Agents view.
Does AI SDK require an adapter?
Cloudflare’s launch documentation directs AI SDK users to wrapAISDK(). Verify the current package and signature in the live docs because beta APIs can change.
Can I use any OTLP destination?
Cloudflare says traces can be exported to supported OTLP-compatible destinations. Confirm the live destination list and test authentication and trace correlation.
Official sources
Source check: August 6, 2026. Verify adapter APIs, supported harnesses, payload controls, sampling, and OTLP destinations before deployment.