I'm in the middle of migrating our existing application from Sentry-raven to Sentry-ruby. There appears to be a missing piece in the migration guide, however.
What do I do with #sanitize_fields?
The old config looked like this:
Raven.configure do |config|
config.sanitize_fields = filter_parameters
end
However, #sanitize_fields was removed and I don't see anywhere where the functionality was replaced.
We used this to ensure that passwords and confirmations were not sent to Sentry (bad day), so I need something to do that in using sentry-ruby.
Any help would be greatly appreciated.
Great suggestion from Sampat. To save future readers having to go through all the comments, the summary is:
filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
config.before_send = lambda do |event, hint|
filter.filter(event.to_hash)
end