Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update Sentry DSN #65

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions config/initializers/sentry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
# RAILS_ENV is set to 'production' for both stage and prod servers.
# We use LOCAL_DOMAIN to differentiate for better Sentry logging.
local_domain = ENV.fetch('LOCAL_DOMAIN', '')
sentry_dsn = ENV.fetch('SENTRY_DSN', '')

Sentry.init do |config|
sentry_dsn.present? && Sentry.init do |config|
config.dsn = sentry_dsn
config.environment = if local_domain['mozilla.social']
'production'
elsif local_domain['stage']
Expand All @@ -13,7 +15,6 @@
'development'
end

config.dsn = 'https://def412573e2b44d39e73a130b09bb25a@o1069899.ingest.sentry.io/4506591637471232'
config.breadcrumbs_logger = [:active_support_logger, :http_logger]

# Set traces_sample_rate to 1.0 to capture 100%
Expand Down
Loading