Techiio-author
Started by Bruce MccullamOct 6, 2021

Open
Missing piece in Sentry-raven to Sentry-ruby guide

1 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 1 VIEWES SHARE

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.

1 Replies

Techiio-commentatorDebarghya Das replied 5 months ago0 likes0 dislikes

Great suggestion from Sampat. To save future readers having to go through all the comments, the summary is:

If you're using Rails you can use this snippet:

  filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
  config.before_send = lambda do |event, hint|
    filter.filter(event.to_hash)
  end
You must be Logged in to reply
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance