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 set of status codes. Examples:
{500} will only send events on HTTP 500.
{400, *range(500, 600)} will send events on HTTP 400 as well as the 5xx range.
{500, 503} will send events on HTTP 500 and 503.
set() (the empty set) will not send events for any HTTP status code.
We started supporting
failed_request_status_codefor Starlette/FastAPI in #3008. We should add the option to other web frameworks as well.failed_request_status_codes#3535failed_request_status_codes#3576Note 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_codesis a set of status codes. Examples:{500}will only send events on HTTP 500.{400, *range(500, 600)}will send events on HTTP 400 as well as the 5xx range.{500, 503}will send events on HTTP 500 and 503.set()(the empty set) will not send events for any HTTP status code.