diff --git a/apps/cloud/docs/platform-logs.md b/apps/cloud/docs/platform-logs.md new file mode 100644 index 0000000000..1c4145234f --- /dev/null +++ b/apps/cloud/docs/platform-logs.md @@ -0,0 +1,17 @@ +# Platform logs + +Apply `apps/cloud/logpush.json` to the account's `workers_trace_events` Logpush +job as the JSON body of `PUT /accounts/{account_id}/logpush/jobs/{job_id}`. +This updates output fields without changing the destination or event selection. +Wrangler's `logpush: true` enables export for the Worker; it does not manage +the account-level job configuration. + +The field list retains outcomes, logs, exceptions, timings and script metadata. +It excludes `Event`, which contains request URLs and other source-event data. +Worker observability query redaction is separate from Logpush output selection. +Redacted request paths and HTTP statuses remain available in application traces. + +After applying, read back the job's output options and check newly delivered +records at the destination. Allow for configuration propagation and in-flight +batches. Verify that `Event` is absent and retained diagnostic fields still arrive. +This does not remove historical records or sanitize arbitrary console messages. diff --git a/apps/cloud/logpush.json b/apps/cloud/logpush.json new file mode 100644 index 0000000000..058392c111 --- /dev/null +++ b/apps/cloud/logpush.json @@ -0,0 +1,20 @@ +{ + "output_options": { + "output_type": "ndjson", + "timestamp_format": "rfc3339", + "field_names": [ + "CPUTimeMs", + "DispatchNamespace", + "Entrypoint", + "EventTimestampMs", + "EventType", + "Exceptions", + "Logs", + "Outcome", + "ScriptName", + "ScriptTags", + "ScriptVersion", + "WallTimeMs" + ] + } +} diff --git a/apps/cloud/wrangler.jsonc b/apps/cloud/wrangler.jsonc index ac07846ebc..04da6b0e34 100644 --- a/apps/cloud/wrangler.jsonc +++ b/apps/cloud/wrangler.jsonc @@ -41,6 +41,8 @@ // Axiom. Pinned here because the setting lives on the script: a deploy that // omits it can reset it to false, which is how the export silently died in // the July deploy-tooling migration. + // Account-level output fields are configured separately via logpush.json; + // see docs/platform-logs.md. "logpush": true, "durable_objects": { "bindings": [