diff --git a/app/models/case_log.rb b/app/models/case_log.rb index 9df999699..a03f377fd 100644 --- a/app/models/case_log.rb +++ b/app/models/case_log.rb @@ -66,13 +66,10 @@ class CaseLog < ApplicationRecord end def collection_start_year - transaction = Sentry.start_transaction(op: "collection_start_year") return unless startdate window_end_date = Time.zone.local(startdate.year, 4, 1) - start_year = startdate < window_end_date ? startdate.year - 1 : startdate.year - transaction.finish if transaction - start_year + startdate < window_end_date ? startdate.year - 1 : startdate.year end def form_name diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index 9323a8ab7..361739cbc 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -1,5 +1,5 @@ Sentry.init do |config| config.breadcrumbs_logger = %i[active_support_logger http_logger] config.enabled_environments = %w[production staging] - config.traces_sample_rate = 1 + config.traces_sample_rate = 0.2 end