fix(sentry): specify current environment for sentry config

This commit is contained in:
Jon 2021-04-20 10:26:22 +02:00 committed by Fabrice Gangler
parent 44ff3401ff
commit 2a0a65a90f

View file

@ -1,7 +1,8 @@
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.environment = ENV.fetch('SENTRY_ENVIRONMENT', Rails.env)
config.enabled_environments = ['production', ENV['SENTRY_ENVIRONMENT'].presence].compact
config.breadcrumbs_logger = [:active_support_logger]
config.traces_sample_rate = ENV['SENTRY_ENABLED'] == 'enabled' ? 0.001 : nil
config.excluded_exceptions += [