Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to tell which rails environment the error came from #499

Open
SaimonL opened this issue Aug 21, 2020 · 0 comments
Open

No way to tell which rails environment the error came from #499

SaimonL opened this issue Aug 21, 2020 · 0 comments

Comments

@SaimonL
Copy link

SaimonL commented Aug 21, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant