Skip to content

Bump to sentry ruby v6#956

Draft
stephencdaly wants to merge 2 commits intomainfrom
bump-to-sentry-ruby-v6
Draft

Bump to sentry ruby v6#956
stephencdaly wants to merge 2 commits intomainfrom
bump-to-sentry-ruby-v6

Conversation

@stephencdaly
Copy link
Copy Markdown
Contributor

@stephencdaly stephencdaly commented Nov 24, 2025

What problem does this pull request solve?

Trello card:

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.

This PR doesn't currently attempt to apply the data scrubbing filter to exception messages, we need to find a way to do this as some exception messages can pull in PII, such as a NoMethodError https://trello.com/c/PuVK5TWl/1346-sentry-alert-forms-runner-undefined-method-strip-for-array

Things to consider when reviewing

  • Does it work when run on your machine?
  • Is it clear what the code is doing?
  • Do the commit messages explain why the changes were made?
  • Are there all the unit tests needed?
  • Do the end to end tests need updating before these changes will pass?
  • Has all relevant documentation been updated?

dependabot bot and others added 2 commits November 20, 2025 11:17
Bumps [sentry-rails](https://github.com/getsentry/sentry-ruby) from 5.28.0 to 6.1.0.
- [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.0...6.1.0)

---
updated-dependencies:
- dependency-name: sentry-rails
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
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.

Don't attempt to filter emails from exception messages, as this is
not straightforward and doesn't seem likely to happen unless we put
emails in exception messages.
@github-actions
Copy link
Copy Markdown

🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-956.www.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
after 5 minutes, there may be something wrong with the ECS task. You will need to go to the integration AWS account
to debug, or otherwise ask an infrastructure person.

For the sign in details and more information, see the review apps wiki page.

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.

1 participant