lib/sentry/rails/configuration.rb in sentry-rails-5.2.1 vs lib/sentry/rails/configuration.rb in sentry-rails-5.3.0

- old
+ new

@@ -40,10 +40,16 @@ 'ActionController::UnknownHttpMethod', 'ActionDispatch::Http::Parameters::ParseError', 'ActiveRecord::RecordNotFound' ].freeze class Configuration + # Rails 7.0 introduced a new error reporter feature, which the SDK once opted-in by default. + # But after receiving multiple issue reports, the integration seemed to cause serious troubles to some users. + # So the integration is now controlled by this configuration, which is disabled (false) by default. + # More information can be found from: https://github.com/rails/rails/pull/43625#issuecomment-1072514175 + attr_accessor :register_error_subscriber + # Rails catches exceptions in the ActionDispatch::ShowExceptions or # ActionDispatch::DebugExceptions middlewares, depending on the environment. # When `rails_report_rescued_exceptions` is true (it is by default), Sentry # will report exceptions even when they are rescued by these middlewares. attr_accessor :report_rescued_exceptions @@ -53,9 +59,10 @@ attr_accessor :skippable_job_adapters attr_accessor :tracing_subscribers def initialize + @register_error_subscriber = false @report_rescued_exceptions = true @skippable_job_adapters = [] @tracing_subscribers = Set.new([ Sentry::Rails::Tracing::ActionControllerSubscriber, Sentry::Rails::Tracing::ActionViewSubscriber,