Repository navigation
feat: Stop reporting client errors to Sentry - #45
Conversation
- Exceptions with a 4XX status code are ignored whatever the capture surface - Messages logged without an exception keep being reported - Removes most of the noise, such as the requests for missing resources - Tests cover every surface and the bounds of the client error range
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe Sentry diagnostics now ignore exceptions with 4XX status codes across capture paths. Tests cover request, record, direct capture, and status-code handling. Messages without exceptions remain reportable. ChangesSentry client-error filtering
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The change filters client-error exceptions while preserving explicitly logged messages, with no established merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 11.11% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 18 functions across 2 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related to #38.
Client errors reach Sentry through every capture surface, the controller actions (
request.exception), the REST dispatch (request.end) and the logging handler, even though they are caused by the client rather than by a failure of the server. In the last 7 days the LDJ instance submitted 3,345 events for requests answered with a 404 (eg:MVCRequestNotHandledfor/favicon.ico), against 1,235 for server errors.Changes
is_ignored()also ignores the exceptions whose status code is a client error (400 to 499), as resolved byresolve_status_code()from the samestatus_codeattribute that the MVC, REST and WSGI layers use to build the error response, socapture()drops them whatever the surfaceVerification
black --checkclean