getsentry / sentry-ruby

Sentry SDK for Ruby
https://sentry.io/for/ruby
MIT License
927 stars 486 forks source link

About 'sanitize_fields' config options #2340

Closed HungNgKh closed 3 weeks ago

HungNgKh commented 3 weeks ago

My old Rails application has sentry-raven configured using these options.

config.sanitize_fields = Rails.application.config.filter_parameters.map(&:to_s)

After migrating from raven to sentry. The option isn't supported anymore, and I ran into this error.

/app/config/initializers/sentry.rb:7:in block in <main>': undefined methodsanitize_fields=' for #

Do we have an alternative way to sanitize sensitive parameters?

HungNgKh commented 3 weeks ago

https://docs.sentry.io/platforms/ruby/guides/rails/configuration/filtering/

I just looked up the document above based on this issue https://github.com/getsentry/sentry-ruby/issues/1140

Look like it solved the problem 🎉 🎉