Skip to content

Add Sentry filter to ignore DefaultHandlerExceptionResolver logs#202

Merged
buckett merged 4 commits intomasterfrom
AB#111014
Feb 19, 2026
Merged

Add Sentry filter to ignore DefaultHandlerExceptionResolver logs#202
buckett merged 4 commits intomasterfrom
AB#111014

Conversation

@buckett
Copy link
Member

@buckett buckett commented Feb 17, 2026

Summary

  • add a Spring configuration that registers a BeforeSendCallback with Sentry
  • drop events whose logger is org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver so they stay in the app log but never hit Sentry

Testing

  • Not run (not requested)

This prevents the DefaultHandlerExceptionResolver from sending it's log lines to sentry, they are still logged in the application logs (in case we hit problems and they provide something useful).
Copilot AI review requested due to automatic review settings February 17, 2026 11:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a Spring Boot configuration to prevent certain Spring MVC handled-exception logs from being sent to Sentry, reducing noise while keeping the messages in the application logs.

Changes:

  • Introduce a @Configuration that registers a SentryOptions.BeforeSendCallback bean.
  • Drop Sentry events whose event.getLogger() matches org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@buckett
Copy link
Member Author

buckett commented Feb 17, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link

Copilot AI commented Feb 17, 2026

@buckett I've opened a new pull request, #203, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits February 17, 2026 12:04
Co-authored-by: buckett <5921+buckett@users.noreply.github.com>
Apply review feedback: use class reference and add unit tests
@buckett buckett merged commit c3cd187 into master Feb 19, 2026
2 checks passed
@buckett buckett deleted the AB#111014 branch February 19, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants