Skip to content

fix: retain diagnostic logs for docs router failures - #273

Merged
vincentkoc merged 1 commit into
mainfrom
fix/docs-error-observability-api-20261015
Oct 15, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/docs-error-observability-api-20261015

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

HTTP failures on the documentation site could not be diagnosed from persisted Worker logs because production logging was disabled.

User Impact

After the router is deployed, operators can inspect future custom logs and uncaught exceptions. This cannot recover historical logs or establish the cause of earlier HTTP 500 responses.

Why This Change Was Made

Enable persistent logs at full sampling, disable routine invocation logs and tracing, and redact query strings from request URLs. This keeps failure evidence without creating a routine log for every successful asset request. Explicit HTTP 5xx responses still need HTTP-status analytics because they need not throw an exception.

No routing, storage, or response behavior changes. Logging increases stored diagnostic events. Merging triggers the repository's native router deployment workflow; production persistence must be verified afterward.

Evidence

  • Wrangler 4.131.1 configuration/bundle dry-run passed.
  • All 40 existing Worker tests passed.
  • git diff --check passed.
  • GitHub-signed head 092d87f0fa8da298d00089a65f1dacf0c9b2e138 has the same full Git tree as the locally validated change; fresh exact-head review and CI are required before merge.
  • Cloudflare's Workers Logs documentation documents separate invocation logging controls.

Production persistence and exception collection still require verification after deployment.

@vincentkoc

Copy link
Copy Markdown
Member Author

Independent exact-head review: 092d87f. No blocking source findings. Full source tree matches the previously inspected change; GitHub signature valid and parent unchanged. Best fix: configure observability at the deployment owner rather than add request logging or exception wrappers. Production TypeScript LOC: +0/-0; tests: +0/-0; configuration: +12 lines for retained diagnostics. Wrangler 4.131.1 schema and Cloudflare Workers Logs contract support separate invocation logging. Custom logs and uncaught exceptions remain collected; ordinary 5xx responses need analytics, and production retention requires post-deployment verification. Fresh exact-head CI must pass before merge.

@vincentkoc
vincentkoc marked this pull request as ready for review October 15, 2026 03:27
@vincentkoc
vincentkoc merged commit 30f0694 into main Oct 15, 2026
4 checks passed
@vincentkoc
vincentkoc deleted the fix/docs-error-observability-api-20261015 branch October 15, 2026 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant