Skip to main content
If you use the Log Connectors screen in Squasher, create the Cloudflare connector first and copy the managed endpoint and ingest key from there. The options below map to the same Squasher ingest paths.

One-click Workers setup

  1. In Squasher, open Integrations > Cloudflare and select Connect.
  2. Approve access to the Cloudflare account.
  3. Select the Workers that can send logs and traces.
  4. Run the opt-in verification and confirm that a test signal appears.
Squasher creates Workers Observability destinations and adds them to the selected Worker settings. It keeps existing destinations. New Workers are not included unless you explicitly select account-wide coverage. The Cloudflare OAuth application must be active for public connections. It requests account read, Workers Observability write, and Workers Scripts read/write access. If the application or a required scope is not available, use the manual OpenTelemetry setup below. Disconnect removes only the Squasher destinations and Worker setting entries that Squasher owns.

Cloudflare Workers

Manual option 1: OpenTelemetry

Cloudflare can export Worker traces and logs over OTLP. In Workers Observability > Destinations, create a trace destination named squasher-traces with:
  • URL: https://ingest.squasher.ai/v1/traces
  • Header: x-squasher-key: sq_pk_your_api_key
Then enable the destination on the Worker:
wrangler.jsonc
Cloudflare currently exports Worker traces and logs, but not Worker metrics. Create a separate log destination pointing to https://ingest.squasher.ai/v1/logs if you also want console output and system logs.

Cloudflare Agents and AI Gateway

Worker tracing captures requests, Durable Object and service-binding calls, and custom spans. It does not automatically turn Cloudflare Agents SDK diagnostic events into standardized AI observations. For model calls routed through Cloudflare AI Gateway, add an AI Gateway OpenTelemetry exporter with the Squasher traces URL and ingest-key header above. Squasher maps the fields that AI Gateway documents today: AI Gateway custom metadata is retained with the observation. Add a stable session.id through cf-aig-metadata when you want model calls grouped into a conversation. Prompt and completion attributes contain customer content, so only enable this exporter when that retention is intentional. To classify application-owned tool work, wrap it in a Worker custom span and set gen_ai.operation.name to execute_tool plus gen_ai.tool.name. Nested custom spans retain their OTLP parent/child relationship. Other custom attributes are retained and queryable even when Squasher does not give them a dedicated field.
Cloudflare does not currently document standard OTLP attributes for Agents SDK sub-agent identity or approval state. Squasher therefore does not claim automatic sub-agent or approval mapping. If you add your own attributes, they are retained as custom evidence rather than reinterpreted.

Option 2: Direct HTTP Reporting

Add error reporting to your Worker:

Cloudflare Logpush

Forward Cloudflare HTTP request logs, firewall events, and Worker logs to Squasher via Logpush.
1

Create a Logpush job

Use the Cloudflare API or dashboard to create a Logpush job:
2

Verify

Logpush sends NDJSON batches. Check your Squasher dashboard for incoming events.

What Gets Captured

Agent handoff