From 1fdc7dfcdc2a2d352b8bd1791f95b8362530e46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Meny?= Date: Thu, 19 May 2022 19:33:30 +0100 Subject: [PATCH] Removes Sentry custom instrumentation --- app/models/case_log.rb | 5 +---- config/initializers/sentry.rb | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) 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