Skip to content

Commit

Permalink
This will set the current Sentry environment to the docker-compose pr…
Browse files Browse the repository at this point in the history
…oject instead of RAILS_ENV. (#7796)

Chose this option instead of replicating environment "production"
because the point of staging was to test everything in production.

The idea is to more easily tell apart events not from actual production.
  • Loading branch information
icarito authored Jun 25, 2020
1 parent 1cc1652 commit 34a2f37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ class Application < Rails::Application

Raven.configure do |config|
# DSN should be an ENV variable!
config.dsn = 'https://0490297edae647b3bd935bdb4658da54:3d1a74cf68744c53b5e70484bece84d1@sentry.io/1410626'
config.dsn = ENV["SENTRY_DSN"] || 'https://0490297edae647b3bd935bdb4658da54:3d1a74cf68744c53b5e70484bece84d1@sentry.io/1410626'
config.environments = %w(production)
config.current_environment = ENV["COMPOSE_PROJECT_NAME"] || ENV["RAILS_ENV"] || %w(production)
end

end
Expand Down

0 comments on commit 34a2f37

Please sign in to comment.