Sentry-ruby: Rails integration should respect config.filter_parameters

Created on 7 Nov 2012  路  5Comments  路  Source: getsentry/sentry-ruby

filter_parameters is the Rails interface to avoid logging sensitive parameters. raven-ruby's Rails integration should integrate it with the data sanitizer.

enhancement

All 5 comments

+1 for this! Out of curiousity have you rolled your own solution for this, @jfirebaugh ? If so would you mind sharing it?

I just relied on the default behavior of Raven::Processor::SanitizeData.

:+1: It would make it at lot easier to filter out CVCs/CVDs and such, right now it involves copying and tweaking SanitizeData. For those not using Rails, the default sanitizer should be easier to configure, which should make the Rails integration straight-forward.

Raven.configure do |config|
  config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)
end

Update in 2020: the new sentry-rails v4 no longer supports config.sanitize_fields. After some headaches looking for upgrade documentation, it turns out Sentry handles much filtering automatically so you can probably remove the setting entirely and be on your way.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SirRawlins picture SirRawlins  路  7Comments

st0012 picture st0012  路  3Comments

steverob picture steverob  路  6Comments

sheki picture sheki  路  6Comments

benebrice picture benebrice  路  5Comments