Skip to content

Commit b95fe4f

Browse files
committed
Only initialise sentry in production
1 parent 354ed18 commit b95fe4f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

config/initializers/sentry.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# frozen_string_literal: true
22

3-
Sentry.init do |config|
4-
config.breadcrumbs_logger = [ :active_support_logger ]
5-
config.dsn = ENV["SENTRY_DSN"]
6-
config.traces_sample_rate = 1.0
3+
if Rails.env.production?
4+
Sentry.init do |config|
5+
config.breadcrumbs_logger = [ :active_support_logger ]
6+
config.dsn = ENV["SENTRY_DSN"]
7+
config.traces_sample_rate = 1.0
8+
end
79
end

0 commit comments

Comments
 (0)