2021-01-28 14:49:03 +01:00
|
|
|
Sentry.init do |config|
|
|
|
|
config.dsn = ENV['SENTRY_ENABLED'] == 'enabled' ? ENV['SENTRY_DSN_RAILS'] : nil
|
|
|
|
config.send_default_pii = false
|
|
|
|
config.enabled_environments = ['production']
|
|
|
|
config.breadcrumbs_logger = [:active_support_logger]
|
2021-02-24 17:45:18 +01:00
|
|
|
config.traces_sample_rate = ENV['SENTRY_ENABLED'] == 'enabled' ? 0.001 : nil
|
2021-03-18 10:40:20 +01:00
|
|
|
config.excluded_exceptions += [
|
|
|
|
# Ignore exceptions caught by ActiveJob.retry_on
|
|
|
|
# https://github.com/getsentry/sentry-ruby/issues/1347
|
|
|
|
'Excon::Error::BadRequest',
|
|
|
|
'ActiveStorage::IntegrityError',
|
|
|
|
'VirusScannerJob::FileNotAnalyzedYetError',
|
|
|
|
'TitreIdentiteWatermarkJob::WatermarkFileNotScannedYetError',
|
|
|
|
'APIEntreprise::API::Error::TimedOut'
|
|
|
|
]
|
2021-01-28 14:49:03 +01:00
|
|
|
end
|