Merge pull request #5994 from betagouv/ignore-sentry-exceptions

Sentry : dans les jobs, ignore les exceptions que l'on gère déjà manuellement (#5994)
This commit is contained in:
Pierre de La Morinerie 2021-03-18 10:58:49 +01:00 committed by GitHub
commit 3cfbe38a8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,4 +4,13 @@ Sentry.init do |config|
config.enabled_environments = ['production']
config.breadcrumbs_logger = [:active_support_logger]
config.traces_sample_rate = ENV['SENTRY_ENABLED'] == 'enabled' ? 0.001 : nil
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'
]
end