Workers - Automatic tracing across Durable Object and Worker subrequests
Key Points
- Unified traces across Worker subrequests
- Nested child spans for service bindings and Durable Objects
- Enable tracing in Wrangler; OpenTelemetry exportable
Summary
Cloudflare Workers now automatically propagate trace context across Worker-to-Worker subrequests (service bindings and Durable Objects), producing a single unified trace with nested child spans. Traces are visible in the Cloudflare dashboard and can be exported to external observability platforms via OpenTelemetry.
Key Points
- Automatic trace context propagation for service bindings and Durable Object calls; subrequests are recorded as nested child spans instead of disconnected traces.
- Traces can be inspected in the Cloudflare dashboard or exported via OpenTelemetry to external tooling.
- Tracing must be enabled in your Wrangler configuration for traces to be recorded (e.g., add
tracing = truein wrangler.toml). - Recommended engineer actions:
- Enable tracing in Wrangler, deploy your Worker, and exercise cross-Worker flows.
- Validate nested spans in the Cloudflare dashboard or your OpenTelemetry backend.
- Upcoming: external trace context propagation using the W3C Trace Context standard to link Worker traces with services outside Cloudflare.
Resources
- See Workers tracing docs to get started and verify configuration.