Export OpenTelemetry logs and traces from your Cloudflare Workers to Better Stack. Cloudflare's built-in Workers observability sends them for you, so no instrumentation code is required.
Create an OpenTelemetry source and keep the tab open. You'll need its Ingesting host and Source token.
In the Cloudflare dashboard, go to Workers & Pages → Observability → Telemetry and click Add destination once for traces and once for logs:
Add the observability block to your wrangler.jsonc. The destinations names must match the destinations you just created:
head_sampling_rate: 1.0 exports every trace. Lower it to sample in production. persist: false sends data to Better Stack only. Set it to true to also keep logs and traces in Cloudflare.
Open Better Stack → Live tail. Your first traces and logs arrive within a minute or two. Send requests to your Worker to see a span per request, each with its console.log lines linked to the trace.
Please let us know at hello@betterstack.com.
We're happy to help! 🙏
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.