One-click Workers setup
- In Squasher, open Integrations > Cloudflare and select Connect.
- Approve access to the Cloudflare account.
- Select the Workers that can send logs and traces.
- Run the opt-in verification and confirm that a test signal appears.
Cloudflare Workers
Manual option 1: OpenTelemetry
Cloudflare can export Worker traces and logs over OTLP. In Workers Observability > Destinations, create a trace destination namedsquasher-traces with:
- URL:
https://ingest.squasher.ai/v1/traces - Header:
x-squasher-key: sq_pk_your_api_key
wrangler.jsonc
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.