Exporting OpenTelemetry Data
Cloudflare Workers supports exporting OpenTelemetry (OTel)-compliant telemetry data to any compatible destination, allowing you to integrate with your existing monitoring and observability stack.
You can export the following types of telemetry data:
- Traces - Traces showing request flows through your Worker and connected services
- Logs - Application logs including
console.log()
output and system-generated logs - Metrics - Performance metrics and custom measurements (not yet supported - coming soon)
Cloudflare Workers can export data to any platform that supports the OpenTelemetry Protocol (OTLP), including:
- Datadog
- Honeycomb
- Grafana Cloud
- Sentry
- Custom OTLP endpoints
Before you can export telemetry data, you need to create and configure a destination in the Cloudflare dashboard.
- Head to your account's Workers Observability section of the dashboard and add a new destination.
- Configure your destination:
- Destination Name - A descriptive name (e.g., "Datadog APM", "Honeycomb Logs")
- Destination Type - Choose between "Traces" or "Logs"
- OTLP Endpoint - The URL where your observability platform accepts OTLP data. This endpoint should end in
/logs
or /traces` - Custom Headers (Optional) - Add any authentication headers or other required headers
After setting up destinations in the dashboard, configure your Worker to export telemetry data by updating your wrangler.jsonc
configuration.
{ "observability": { "traces": { "enabled": true, "destinations": ["honeycomb-apm", "datadog-apm"], "head_sample_rate": 0.05 },
"logs": { "enabled": true, "destinations": ["datadog-logs", "honeycomb-logs"], "head_sample_rate": 0.5 } }}
Then redeploy your Worker for new configurations to take effect.
enabled
- Enable or disable telemetry collectionhead_sample_rate
- Percentage of requests to sample (0.0 to 1.0)destinations
- Array of destination names to export data to. These should be from the destination names created in the dashboard. Include"cloudflare"
in this array to also send traces and logs to the Workers Dashboard.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark