From 46515df4a3e3e167f549850f361f2b64374136a5 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Wed, 2 Sep 2026 17:51:55 -0400 Subject: [PATCH] refactor(updates): use useragent event field --- packages/updates/README.md | 2 +- packages/updates/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/updates/README.md b/packages/updates/README.md index aa991e41917..c2f7bbcb0e6 100644 --- a/packages/updates/README.md +++ b/packages/updates/README.md @@ -21,7 +21,7 @@ The Worker has `workers_dev` and preview URLs disabled so the custom hostname is Every request reaching the Worker emits an unsampled event at request start to the shared production Cloudflare lake stream through the `EVENTS` Pipelines binding. Events use `source: "update"`, `type: "request"`, an ISO `timestamp`, and a `payload` containing -the method, path, `user_agent`, `ip` (from Cloudflare's `CF-Connecting-IP` header), +the method, path, `useragent`, `ip` (from Cloudflare's `CF-Connecting-IP` header), country, and Cloudflare colo. Query strings, request bodies, cookies, and authorization headers are not included. Response status and duration are not recorded. diff --git a/packages/updates/src/index.ts b/packages/updates/src/index.ts index f1906b1cccf..efd0623d595 100644 --- a/packages/updates/src/index.ts +++ b/packages/updates/src/index.ts @@ -44,7 +44,7 @@ export default { payload: { method: request.method, path: url.pathname, - user_agent: request.headers.get("user-agent"), + useragent: request.headers.get("user-agent"), ip: request.headers.get("cf-connecting-ip"), cf_country: request.cf?.country, cf_colo: request.cf?.colo,