Skip to content

Commit

Permalink
Add THREESCALE_ENVIRONMENT and use it in Bugsnag initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
mayorova committed Nov 28, 2022
1 parent 07f37e0 commit 2aa4f8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config/examples/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ base: &default
active_merchant_logging: <%= ENV.fetch('ACTIVE_MERCHANT_LOGGING', false) %>
billing_canaries:

# Sets the application environment that may be different from RAILS_ENV (e.g. 'staging')
environment: <%= ENV.fetch('THREESCALE_ENVIRONMENT', Rails.env) %>

development:
<<: *default
secure_cookie: false
Expand Down
4 changes: 2 additions & 2 deletions config/initializers/bugsnag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Bugsnag.configure do |config|
config.api_key = Rails.configuration.three_scale.bugsnag_api_key
config.app_version = System::Deploy.info.revision
config.notify_release_stages = %w[production]
stages = Rails.configuration.three_scale.error_reporting_stages
config.notify_release_stages = stages if stages.present?
config.notify_release_stages = stages.present? ? stages : %w[production]
config.release_stage = Rails.configuration.three_scale.environment || Rails.env

ignore_error_names = ActionDispatch::ExceptionWrapper.rescue_responses.keys + ['WebHookWorker::ClientError']

Expand Down

0 comments on commit 2aa4f8a

Please sign in to comment.