Browse Source

Removes Sentry custom instrumentation

pull/619/head
Stéphane Meny 3 years ago committed by baarkerlounger
parent
commit
1fdc7dfcdc
  1. 5
      app/models/case_log.rb
  2. 2
      config/initializers/sentry.rb

5
app/models/case_log.rb

@ -66,13 +66,10 @@ class CaseLog < ApplicationRecord
end end
def collection_start_year def collection_start_year
transaction = Sentry.start_transaction(op: "collection_start_year")
return unless startdate return unless startdate
window_end_date = Time.zone.local(startdate.year, 4, 1) window_end_date = Time.zone.local(startdate.year, 4, 1)
start_year = startdate < window_end_date ? startdate.year - 1 : startdate.year startdate < window_end_date ? startdate.year - 1 : startdate.year
transaction.finish if transaction
start_year
end end
def form_name def form_name

2
config/initializers/sentry.rb

@ -1,5 +1,5 @@
Sentry.init do |config| Sentry.init do |config|
config.breadcrumbs_logger = %i[active_support_logger http_logger] config.breadcrumbs_logger = %i[active_support_logger http_logger]
config.enabled_environments = %w[production staging] config.enabled_environments = %w[production staging]
config.traces_sample_rate = 1 config.traces_sample_rate = 0.2
end end

Loading…
Cancel
Save