-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Issue Description
During a ruby upgrade we have noticed that ActiveSupport::ParameterFilter started coming up as uninitialized during our deployment process. It is reproducible in the test environment on a fresh install of rails app and sentry-ruby and sentry-rails gems. It is a bit weird that the development environment has no issues starting up. We are experiencing this issue in a deployed environment and when running tests locally.
Exception:
/config/initializers/sentry.rb:4:in block in <main>: uninitialized constant ActiveSupport::ParameterFilter (NameError)
Reproduction Steps
- fresh rails install (ruby 3.3.4 & rails 7.2)
- add gems of sentry-ruby & sentry-rails, and bundle install
- add a initializer for sentry
- add a ActiveSupport::ParameterFilter (as described in https://docs.sentry.io/platforms/ruby/guides/rails/configuration/filtering/)
rails test
Expected Behavior
rails test to start without exceptions
or
Documentation to be updated with require "active_support/parameter_filter" as part of the required initializer code.
Actual Behavior
Exception:
/config/initializers/sentry.rb:4:in block in <main>: uninitialized constant ActiveSupport::ParameterFilter (NameError)
Ruby Version
3.3.4
SDK Version
sentry-ruby (5.19.0), sentry-rails (5.19.0)
Integration and Its Version
Rails
Sentry Config
Sentry.init do |config|
config.dsn = 'redacted'
filter = ActiveSupport::ParameterFilter.new(Rails.application.config.filter_parameters)
config.before_send = lambda do |event, hint|
filter.filter(event.to_hash)
end
# get breadcrumbs from logs
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
# enable tracing
# we recommend adjusting this value in production
config.traces_sample_rate = 1.0
# enable profiling
# this is relative to traces_sample_rate
config.profiles_sample_rate = 1.0
end
Metadata
Metadata
Assignees
Labels
Projects
Status