Conversation
Bumps [sentry-rails](https://github.com/getsentry/sentry-ruby/tree/master/sentry-rails) and [sentry-ruby](https://github.com/getsentry/sentry-ruby/tree/master/sentry-ruby) to 6.4.1. Updates `sentry-rails` from 5.28.1 to 6.4.1 - [Release notes](https://github.com/getsentry/sentry-ruby/releases) - [Changelog](https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-ruby@5.28.1...6.4.1) Updates `sentry-ruby` from 5.28.1 to 6.4.1 - [Release notes](https://github.com/getsentry/sentry-ruby/releases) - [Changelog](https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-ruby@5.28.1...6.4.1)
config.enable_tracing has been removed in favour of config.traces_sample_rate, which has a default value of nil Sentry::Event#to_hash has been replaced by to_h Returning a hash from before_send is no longer supported and will drop the event. Instead, we need to individually apply the filters to the places where PII could get in as per https://docs.sentry.io/platforms/ruby/guides/rails/configuration/filtering/#using-before-send We also need to filter the breadcrumbs using config.before_breadcrumb.
Re-add filtering of email addresses from exception messages sent to Sentry, as it has happened in the past. We also tweak the specs slightly, to avoid having the test email address in the exception stacktrace. This was causing one of the tests to fail, and I didn't think it was worth making the implementation go through the traceback to scrub email addresses as it previously was; I think we are unlikely to have an email address that we don't want in Sentry hardcoded in the source code.
|
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2606.admin.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
stephencdaly
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What problem does this pull request solve?
Trello card: https://trello.com/c/mBwTjNea/2867-update-sentry-ruby-to-v6
Bumps sentry-rails and sentry-ruby from 5.28.1 to 6.4.1.
Sentry Ruby SDK 6.0.0 removed the interface for
before_send/before_breadcrumbfilters, so that returning a hash instead of an event object no longer works (see https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md#600, getsentry/sentry-ruby#2529). This PR rewrites the filter code to keep the same behaviour, as we have had incidents in the past where a person's email address was in the exception message sent to Sentry.Things to consider when reviewing