-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(aiohttp): Add failed_request_status_codes
#3551
feat(aiohttp): Add failed_request_status_codes
#3551
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #3551 +/- ##
=======================================
Coverage 84.30% 84.31%
=======================================
Files 133 133
Lines 13885 13890 +5
Branches 2929 2930 +1
=======================================
+ Hits 11706 11711 +5
Misses 1438 1438
Partials 741 741
|
2adb74e
to
3ad9fa9
Compare
3ad9fa9
to
4558c9a
Compare
`failed_request_status_codes` allows users to specify the status codes, whose corresponding `HTTPException` types, should be reported to Sentry. By default, these include 5xx statuses, which is a change from the previous default behavior, where no `HTTPException`s would be reported to Sentry. Closes #3535
4558c9a
to
87e4a7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Please also add to the docs.
We should also think about what to do with the old-style failed_request_status_codes
format that Starlette/FastAPI is using. We can deprecate it in favor of using a set and then do the switch with the new major.
failed_request_status_codes
allows users to specify the status codes, whose correspondingHTTPException
types, should be reported to Sentry. By default, these include 5xx statuses, which is a change from the previous default behavior, where noHTTPException
s would be reported to Sentry.The status codes are only captured as errors if they are returned by raising an
HTTPException
. If a response with one of thefailed_request_status_codes
is returned, we would not report this to Sentry, as there is no exception object we can send and no easy way to create one.Closes #3535