Skip to content

Feature request: sentry-spring only notifying for exceptions that result in 5xx response #681

@kilink

Description

@kilink

It would be great if there were a mechanism to only forward exceptions that resulted in a 5xx HTTP response when using the sentry-spring integration.

For instance, I may have a Spring ExceptionHandler registered that maps an Exception to a "400 Bad Request" or "404 Not Found" response, and I don't really care about seeing such errors in Sentry.

Other people seem to have requested a mechanism for filtering out specific exception types, and I get that I could do that same by adding a ShouldSendEventCallback that filters out unwanted exceptions, but that can become burdensome since it requires me to enumerate and understand all of the exceptions that may be mapped back to non-5xx repsonses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions