Cloudflare
Integration

Send Cloudflare Workers Logs and Traces to Sazabi

By Sazabi Team

Last verified on Nov 8, 2026.

Cloudflare Workers can export their logs and traces over OTLP, and Sazabi accepts both. You set it up once in the Cloudflare account and then opt each Worker in through its Wrangler config.

What you get

Workers Observability exports two signals. Logs cover console output, including console.log(), along with system logs. Traces show the request flow through a Worker and the services it calls. Sazabi receives both from the Cloudflare Workers source, so one request leaves a trace and the log lines written during it.

This is different from edge network logs. HTTP request, firewall and DNS datasets come from Logpush, which is a separate source covered on the Cloudflare integration page. Use Logpush to see traffic at the edge and this source to see what your code did with it.

Set it up

You work in two places.

  1. In the Cloudflare dashboard, create two account-level destinations in Observability. Name one sazabi-logs, type Logs, with your Sazabi logs intake URL ending in /v1/logs. Name the other sazabi-traces, type Traces, with the traces intake URL ending in /v1/traces.
  2. In each Worker's wrangler.jsonc or wrangler.toml, enable observability and list those destination names. Then run wrangler deploy.

Destinations belong to the account, so create them in the same Cloudflare account that owns the Workers. The names are case-sensitive and must match the dashboard exactly.

Example: the Wrangler config

This is an example wrangler.jsonc fragment using the keys from Cloudflare's docs. The sampling rates are choices, not requirements.

{
  "observability": {
    "logs": {
      "enabled": true,
      "destinations": ["sazabi-logs"],
      "head_sampling_rate": 1,
      "persist": false,
    },
    "traces": {
      "enabled": true,
      "destinations": ["sazabi-traces"],
      "head_sampling_rate": 0.1,
      "persist": false,
    },
  },
}

Two settings deserve a decision. head_sampling_rate is the share of requests that are exported, so a trace rate of 0.1 means about one request in ten has a trace in Sazabi, and counts you see there are samples. And persist defaults to true, which also stores the data in Cloudflare. Cloudflare says persisted data starts to count toward Cloudflare Observability ingestion and storage usage on December 1, 2026. Set it to false if Sazabi is the only place you need the data.

Log structured JSON

Cloudflare recommends logging JSON objects so fields are extracted for you. The same habit pays off in Sazabi, because a field can be searched without parsing a sentence. An example line from a Worker:

console.log(
  JSON.stringify({
    event: 'checkout_failed',
    orderId: 'ord_8841',
    upstreamStatus: 502,
    route: '/api/checkout',
  })
)

After a deploy, search for checkout_failed and group by upstreamStatus. If every record carries 502, the problem sits behind the Worker, and you can open the trace for one of those requests to see which call failed.

Choosing sampling rates

Sampling decides what you can answer later. Logs at a rate of 1 keep every line, which suits a low-traffic Worker or a new release you want to watch closely. Traces produce more data per request than a log line, so a lower rate is common on busy Workers.

A practical split is full logs with a fractional trace rate. You keep every error line and the traces still show the shape of typical requests. If a bug only affects one customer, a low trace rate may miss it, but the logs will not. Raise the trace rate for a short time when you chase a specific issue, then lower it again after the deploy.

You can also create the source from the CLI with sazabi log-sources create cloudflare_workers --mode manual and read back the endpoints it prints.

Verify and troubleshoot

Invoke a Worker you opted in, then open the Intake page in Sazabi and look for the Cloudflare Workers source. Cloudflare notes that events can take several minutes to reach a destination, so give it time before you assume a fault.

  • No telemetry. Check that observability is enabled in the Wrangler config and that the names match.
  • Logs but no traces. Create the second destination and list its name too.
  • Destination not found. You created it in a different Cloudflare account.

For the broader picture, read how OpenTelemetry fits with Sazabi and the cloud platform sources that sit beside this one.

Set it up

The Cloudflare Workers setup guide on docs.sazabi.com walks through connecting it.

What Sazabi detects from these logs today

These detections are on for every production project, with no monitors or alert rules to write. Sazabi opens an issue when one fires.

  • Novel event: A kind of error that has never appeared before.

Frequently Asked Questions

How do I send Cloudflare Workers logs to Sazabi?

Create a Logs destination and a Traces destination in Cloudflare Observability, pointed at your Sazabi OTLP intake URLs. Then list the destination names in each Worker Wrangler config and redeploy.

Do I need a Cloudflare Enterprise plan for this?

The Sazabi docs list Workers Observability access and Workers deployed with Wrangler as the prerequisites. Logpush is a separate source, and it is available on every Cloudflare plan.

Why do traces arrive but logs do not?

Usually only one destination exists or only one name is in the Wrangler config. Create both destinations and list both names, matching the dashboard names exactly.

Does this send Workers metrics?

No. Cloudflare says Workers infrastructure metrics and custom metrics cannot be exported through OpenTelemetry.

Sources

  1. Destination names sazabi-logs and sazabi-traces, /v1/logs and /v1/traces endpoints, opting Workers in through Wrangler config, redeploy, troubleshooting, Logpush as a separate source (accessed Nov 8, 2026)
  2. Workers export OpenTelemetry-compliant logs and traces, the observability.logs and observability.traces Wrangler keys, head_sampling_rate, persist and its default, metrics cannot be exported (accessed Nov 8, 2026)
  3. Account-level destinations of type Traces or Logs, destination delivery status (accessed Nov 8, 2026)
  4. Workers Logs content, recommendation to log structured JSON, head-based sampling (accessed Nov 8, 2026)