Cloudflare Workers Integration

Export traces and logs from your Cloudflare Workers directly to Firetiger using built-in OpenTelemetry support. No additional packages or bindings are required.

This guide covers application-level telemetry from your Worker code (traces, console.log() output, and system logs). For HTTP request logs from Cloudflare’s edge network, see the Cloudflare Logpush Integration.

Prerequisites

  • An active Firetiger deployment
  • A Cloudflare account with at least one deployed Worker
  • Access to the Cloudflare dashboard or wrangler CLI

Step 1: Get your Firetiger ingest credentials

  1. Log in to your Firetiger account
  2. Navigate to the Integrations page
  3. Copy your Ingest Basic Auth Credentials (endpoint, username, and password)

Generate the Base64-encoded credentials:

echo -n "username:password" | base64

Replace username and password with the values from your Integrations page.

Step 2: Create OTLP destinations in Cloudflare

In the Cloudflare dashboard, go to Compute & AI > Workers Observability > Destinations.

Traces destination

Click Add destination and configure:

Field Value
Destination name firetiger-traces
Destination type Traces
OTLP endpoint https://ingest.{deployment_name}.firetigerapi.com/v1/traces
Custom header name Authorization
Custom header value Basic <base64-credentials>

Logs destination

Click Add destination again and configure:

Field Value
Destination name firetiger-logs
Destination type Logs
OTLP endpoint https://ingest.{deployment_name}.firetigerapi.com/v1/logs
Custom header name Authorization
Custom header value Basic <base64-credentials>

Replace {deployment_name} with your Firetiger deployment name, and <base64-credentials> with the output from the base64 command above.

Step 3: Enable observability on your Worker

You can enable observability via the dashboard or wrangler.toml.

Option A: Dashboard

  1. Go to Compute & AI > Workers & Pages
  2. Select your Worker
  3. Go to Settings > Observability
  4. Enable traces and logs, and select the firetiger-traces and firetiger-logs destinations

Option B: wrangler.toml

Add the following to your Worker’s wrangler.toml:

[observability.traces]
enabled = true
head_sampling_rate = 1.0
destinations = ["firetiger-traces"]

[observability.logs]
enabled = true
head_sampling_rate = 1.0
destinations = ["firetiger-logs"]

Adjust head_sampling_rate as needed (1.0 = 100% of requests, 0.01 = 1%).

Step 4: Deploy and verify

  1. Deploy your Worker with wrangler deploy
  2. Send a few requests to your Worker
  3. Log in to Firetiger and check your traces and logs views

Traces will include the full request lifecycle through your Worker, and logs will include all console.log() output and system-generated logs.

What data is exported

Signal Included
Traces Request lifecycle spans, sub-requests, bindings (KV, D1, R2, etc.)
Logs console.log() / console.error() output, system-generated logs
Metrics Not yet supported by Cloudflare Workers observability

Sampling

Cloudflare applies head-based sampling at the edge. The head_sampling_rate controls what percentage of requests produce telemetry:

  • 1.0 - Export telemetry for every request (recommended for low-traffic Workers)
  • 0.1 - Export for 10% of requests
  • 0.01 - Export for 1% of requests (recommended for high-traffic Workers)

When a request is sampled, all traces and logs for that request are exported together.

Troubleshooting

No data appearing in Firetiger?

  • Verify the OTLP endpoints are correct (check for typos in the deployment name)
  • Ensure the Authorization header value includes the Basic prefix
  • Confirm the destinations are selected on the Worker’s observability settings
  • Check that head_sampling_rate is not set to 0
  • Try setting head_sampling_rate = 1.0 temporarily to rule out sampling

Authentication errors?

  • Re-generate your Base64 credentials and update the destination header value
  • Ensure there are no extra spaces or newlines in the credentials

This site uses Just the Docs, a documentation theme for Jekyll.