Skip to content
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

Add failed_request_status_codes for more web frameworks #3134

Open
4 of 12 tasks
sentrivana opened this issue Jun 5, 2024 · 2 comments
Open
4 of 12 tasks

Add failed_request_status_codes for more web frameworks #3134

sentrivana opened this issue Jun 5, 2024 · 2 comments
Assignees

Comments

@sentrivana
Copy link
Contributor

sentrivana commented Jun 5, 2024

We started supporting failed_request_status_code for Starlette/FastAPI in #3008. We should add the option to other web frameworks as well.

Note that this might be tricky since we don't alert based on status codes in some frameworks, but rather internal exceptions happening in request handlers.

Failed request status codes

failed_request_status_codes is a list of status code ranges, where a status code range is one of:

  • single number
  • a sequence with a __contains__ method (so that we can check whether a code is in the sequence with in)

The following are examples of valid failed_request_status_codes:

  • [500]
  • [403, range(500, 599)]
  • [{500, 501, 502, 503}]
@syserr0r
Copy link

syserr0r commented Jun 7, 2024

Having this feature for the Django integration would be very helpful to us, if possible

@szokeasaurusrex
Copy link
Member

Note that this might be tricky since we don't alert based on status codes in some frameworks, but rather internal exceptions happening in request handlers.

We will first implement this feature for any frameworks where we do alert based on status codes, before moving onto frameworks where we capture the exceptions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

4 participants