Cloudflare
Receive logs from Cloudflare via an HTTP Logpush job.
Cloudflare Logpush batches log events to an HTTP endpoint. Dstl8 receives them as one HTTP source and figures out streams from what comes in. This page covers Workers Trace Events — logs and exceptions from your Workers.
Prerequisites
The
dstl8CLI, installed and logged in. See Dstl8 CLI — check withdstl8 profiles, the active one is marked►.A Cloudflare account with Logpush. Workers Trace Events needs the Workers Paid plan.
Account-level access — this dataset is account-scoped only, not per zone.
Add a Cloudflare source
Create the source from the CLI or the web app — either way you end up with the same destination URL for the Cloudflare-side Logpush job.
From the CLI
1. Run the wizard
dstl8 sources add cloudflareOne prompt — the source name (default cloudflare). The secret's generated for you, so there's nothing to grab from Cloudflare first. :skip cancels.

Prefer scripting it?
Still prints the destination URL below, so it's fine for CI.
2. Copy the destination URL
The wizard ends with one URL — your webhook URL plus the Logpush secret as a query param:
https://<org_id>.app.dstl8.ai/src-<id>?header_X-CF-Secret=<secret>
That's the only thing the Cloudflare side needs. (Cloudflare turns header_* query params into real request headers — that's how the secret gets there without a separate field.)
Sensitive. Don't commit it or paste it into shared docs.
Grab it now — there's no command to print it again. If you lose it, the web app still has it.
3. Assign the source to a workspace
One workspace (the common case): streams get assigned automatically.
A few workspaces: pick from a checkbox list —
1-N:toggle a:all n:none enter:assign N q:skip.Skipped it, or used
--yes? Do it later:

From the web app
1. Open the Add Source dialog
From Sources, click Add Source and select Cloudflare.

2. Configure the source
Give the source a unique name (e.g. cloudflare-prod) and click Create.

3. Copy the connection details
Dstl8 displays the values you'll paste into Cloudflare's Logpush job:
Webhook URL
https://<org_id>.app.dstl8.ai/src-<id>
LogPush Secret
Sent by Cloudflare in the X-CF-Secret header to authenticate incoming events.
LogPush Destination URL
Webhook URL + ?header_X-CF-Secret=<secret> — the one value the Cloudflare side needs.

Sensitive. Don't commit it or paste it into shared docs.
4. Assign the source to a workspace
Pick the workspace that should receive this source's streams and click Assign (or Skip to assign later from the source's actions menu).

Create the Logpush job in Cloudflare
With that destination URL copied:
1. Open Logpush
In the left menu, go to Observe → Investigate → Logpush.

2. Create a job
Click Create a Logpush job.

3. Pick HTTP
Select HTTP as the destination. Cloudflare will POST batches of log events to that endpoint on an interval instead of streaming them one by one.

4. Paste the URL
In HTTP endpoint, paste the destination URL you copied earlier. Don't strip the header_X-CF-Secret param or add others.

5. Pick the dataset and submit
Select Workers Trace Events. Leave the rest at their defaults, then Submit.


Last updated