This document explains how to instrument Cloudflare Workers with OpenTelemetry using Community or Official methods and send traces to SigNoz.
Using self-hosted SigNoz? Most steps are identical. To adapt this guide, update the endpoint and remove the ingestion key header as shown in Cloud → Self-Hosted.
Prerequisites
You will need the following in place before moving on to the next step:
- A Cloudflare account (Paid plan or higher in case of Official)
- Wrangler, the CLI tool for Cloudflare.
Send traces to SigNoz
Cloudflare Workers supports exporting OpenTelemetry (OTel)-compliant traces directly to SigNoz without code changes, using Cloudflare's built-in observability features.
Step 1: Create destination in Cloudflare
- Go to Workers Observability in your Cloudflare dashboard
- Click on Destinations Tab
- Click Add destination
- Configure:
- Name: Choose a name (e.g.,
signoz-traces) - Type: Traces
- OTLP Endpoint:
https://ingest.<region>.signoz.cloud:443/v1/traces- See SigNoz Ingestion Docs
- Headers:
- Add
signoz-ingestion-key: <your-ingestion-key>
- Add
- Name: Choose a name (e.g.,
- Click Save
Step 2: Configure Wrangler
Update wrangler.jsonc ( use the destination name created in Step 1 ):
{
"observability": {
"traces": {
"enabled": true,
"destinations": ["signoz-traces"]
}
}
}
Additional configuration options:
You can customize the configuration with additional options such as:
head_sampling_rate: Control sampling rate for tracespersist: false: Disable storing data in Cloudflare dashboard (only send to SigNoz)
For complete configuration options, refer to Cloudflare's OpenTelemetry documentation.
Step 3: Deploy
Run wrangler deploy. Data appears in SigNoz within minutes.
Limitations
- Beta status: OpenTelemetry data export from Cloudflare Workers is in beta. Features may change.
Step 1: Install the SDK
Install @microlabs/otel-cf-workers in your project.
npm i @microlabs/otel-cf-workers
@microlabs/otel-cf-workers is a third party OpenTelemetry compatible library for instrumenting and exporting traces from Cloudflare Workers.
Step 2: Add Node.js Compatibility Flag
OpenTelemetry requires the Node.js compatibility flag to be enabled at the top level of your wrangler.toml.
compatibility_flags = [ "nodejs_compat" ]
Step 3: Configure tracer in Cloudflare Workers project
Navigate to the wrangler project directory, and add the following code to your src/index.ts file.
import { instrument, ResolveConfigFn } from '@microlabs/otel-cf-workers'
const handler = {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
// your cloudflare worker code
},
}
const config: ResolveConfigFn = (env: Env, _trigger) => {
return {
exporter: {
url: 'https://ingest.<region>.signoz.cloud:443/v1/traces',
headers: { 'signoz-ingestion-key': '<your-ingestion-key>' },
},
service: { name: '<service-name>' },
}
}
export default instrument(handler, config)
- Set the
<region>to match your SigNoz region - Replace
<your-ingestion-key>with your SigNoz ingestion key - Replace
<service-name>with the name of the service associated with this trace
Step 4: Deploy the project
Deploy the project to Cloudflare Worker.
npm run deploy
Validate
After deploying your Worker, verify that traces are being sent to SigNoz:
Access SigNoz UI and generate traces: Navigate to the
Tracestab in your SigNoz dashboard and send requests to your Cloudflare Worker to generate trace dataView traces: Within a few minutes, traces from your Worker should appear in the Traces view
Expected behavior: You should see traces with attributes like worker_name, script_name, and any custom fields from your Worker code.

You can click on a particular TraceID in the Traces view to get the detailed view of the Cloudflare Worker as shown below.

Troubleshooting
Traces not appearing in SigNoz
Symptom: No traces visible in SigNoz UI after deploying the Worker.
Things to investigate:
Check destination status
- In your Cloudflare dashboard under Workers Observability > Destinations, verify the status:
- Last: n minutes ago - Data is being delivered successfully
- Never run - No data has been delivered yet (check if your Worker is receiving traffic or review sampling rates)
- Error - Delivery failed (verify OTLP endpoint and authentication headers)
- In your Cloudflare dashboard under Workers Observability > Destinations, verify the status:
Incorrect OTLP endpoint
- Wrong region or endpoint format
- Verify the endpoint matches your SigNoz setup: SigNoz Ingestion Docs
Missing or invalid ingestion key
- Incorrect or missing
signoz-ingestion-keyheader - Copy the correct ingestion key from SigNoz settings and update the destination header
- Incorrect or missing
Worker not receiving traffic
- No requests to the Worker means no traces generated
- Send test requests to your Worker endpoint
Sampling rate too low
- Low
head_sampling_ratemeans fewer traces are sent - Increase the sampling rate in your
wrangler.jsoncconfiguration
- Low
Network/connectivity issues
- Firewall or network blocking OTLP traffic
- Verify your OTel collector is accessible from Cloudflare Workers
Verification: Check the destination status in Cloudflare dashboard (Workers Observability > Destinations) to see delivery status and any errors.
Next steps
- Set up logs: Send Cloudflare Worker logs to SigNoz by following the Cloudflare logs guide
- Create dashboards: Build custom dashboards to visualize your Worker performance
- Set up alerts: Configure alerts based on trace data to monitor Worker health
- Analyze traces: Use the Trace Explorer to debug issues and optimize performance