From 36e687ee65a43c514f61a3669e68319fd1abc55f Mon Sep 17 00:00:00 2001 From: Katherine Martin <78093815+martikat@users.noreply.github.com> Date: Tue, 1 Oct 2024 11:12:34 +0100 Subject: [PATCH] Update config for Sentry (#868) --- config/application.rb | 3 +++ config/initializers/sentry.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index d9bd2d64..897f8334 100644 --- a/config/application.rb +++ b/config/application.rb @@ -54,6 +54,9 @@ class Application < Rails::Application config.active_record.legacy_connection_handling = false config.generators.test_framework = :rspec + # Sentry + config.sentry_dsn = ENV.fetch('SENTRY_DSN', '#SENTRY_DSN_env_var_missing') + # # Azure Environments # diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb index 05512f8c..87281276 100644 --- a/config/initializers/sentry.rb +++ b/config/initializers/sentry.rb @@ -1,5 +1,5 @@ Sentry.init do |config| - config.dsn = 'https://77cb385b90b249718df362e6dcdfdc46@o1115461.ingest.sentry.io/6274627' + config.dsn = Rails.application.config.sentry_dsn config.breadcrumbs_logger = %i[active_support_logger http_logger] config.enabled_environments = %w[production]