exception_notification icon indicating copy to clipboard operation
exception_notification copied to clipboard

No way to tell which rails environment the error came from

Open SaimonL opened this issue 5 years ago • 0 comments

Feature request

In Webhook there is no information about which mode (environment) rails was running (staging, production, qa). The payload does not provide such information (not even in environment payload) so if you have auto scale (random hostname) and hundreds of instances in both qa environment and production environment and an error has occurred, then by the time you read the webhook those instances are now gone (auto scale down) and you don't know which env that was from.

It is possible to add the following code in
method "def call(exception, options = {})"
right after options[:body][:rails_root]

File: "lib/exception_notifier/webhook_notifier.rb"

Code

options[:body][:rails_env] = Rails.env if defined?(Rails) && Rails.respond_to?(:env)

Thanks

SaimonL avatar Aug 21 '20 11:08 SaimonL