lib/sentry/rails/configuration.rb in sentry-rails-5.17.3 vs lib/sentry/rails/configuration.rb in sentry-rails-5.18.0

- old
+ new

@@ -124,10 +124,18 @@ # In those cases, we should skip ActiveJob's reporting to avoid duplicated reports. attr_accessor :skippable_job_adapters attr_accessor :tracing_subscribers + # When the ActiveRecordSubscriber is enabled, capture the source location of the query in the span data. + # This is enabled by default, but can be disabled by setting this to false. + attr_accessor :enable_db_query_source + + # The threshold in milliseconds for the ActiveRecordSubscriber to capture the source location of the query + # in the span data. Default is 100ms. + attr_accessor :db_query_source_threshold_ms + # sentry-rails by default skips asset request' transactions by checking if the path matches # # ```rb # %r(\A/{0,2}#{::Rails.application.config.assets.prefix}) # ``` @@ -155,9 +163,11 @@ @tracing_subscribers = Set.new([ Sentry::Rails::Tracing::ActionViewSubscriber, Sentry::Rails::Tracing::ActiveRecordSubscriber, Sentry::Rails::Tracing::ActiveStorageSubscriber ]) + @enable_db_query_source = true + @db_query_source_threshold_ms = 100 @active_support_logger_subscription_items = Sentry::Rails::ACTIVE_SUPPORT_LOGGER_SUBSCRIPTION_ITEMS_DEFAULT.dup end end end end