# frozen_string_literal: true

if Rails.env.eql?('production') && ENV['SENTRY_DSN'].present?
   Sentry.init do |config|
    config.dsn = ENV['SENTRY_DSN']
    config.breadcrumbs_logger = [:active_support_logger]

    # Send 10% of transactions for performance monitoring
    config.traces_sample_rate = 0.1
  end
end

# frozen_string_literal: true

if Rails.env.eql?('production') && ENV['SENTRY_DSN'].present?
   Sentry.init do |config|
    config.dsn = ENV['SENTRY_DSN']
    config.breadcrumbs_logger = [:active_support_logger]

    # Send 5% of transactions for performance monitoring
    config.traces_sample_rate = 0.05
  end
end

Reduce the Sentry sampling to 5%
Reduce the Sentry sampling to 5%

See https://ministryofjustice.github.io/operations-engineering/documentation/services/sentry.html#sentry-io
