Ruby on Rails Honeybadger integration not working -
I have included honeybadger in my ruby ββon rails app. This all worked very well and also the rake validation task is working as intended. Subsequently, I made exceptions on purpose in order to "fill" the dashboard so that I could appreciate the appearance, etc. But somehow errors and exceptions are not tracked. I used the guide to install and integrate honeybadger and as I mentioned earlier the exception thrown by the rake task is being tracked correctly.
begin
raise('This is an error')
rescue => ex
notify_honeybadger(ex)
end
This is a sample code from my application. Usually the honeybadger has intermediate hook rails, so I don't have to manually notify it. But even if I do, nothing is tracked at all. Anyone have any advice for me?
Regards
source to share
if you are trying to test it on localhost you need to add the following parameter to your honeybadger initializer:
config.development_environments = %w(test)
This parameter is a list of environments in which notifications should not be sent and by default development
env is listed. A detailed description of the customization option is here .
source to share
As of Honeybadger 2.0, initializers are no longer promoted; in Rails 4 apps you will probably get warnings
[rails console]
UPGRADE WARNING: Honeybadger.configure was removed in v2.0 and has no effect.
Please upgrade: https://www.honeybadger.io/s/gem-upgrade
Rails will use config / honeybadger.yml instead
[config/honeybadger.yml]
---
api_key: 'xxxxxx'
metrics.enabled: false
development_environments: ["test", "cucumber"]
As stated earlier, you need to make sure it development_environments
doesn't include "development".
Use force: true
to make sure filters are ignored.
[rails console]
Honeybadger.notify(Exception.new("asdf"), force: true)
If you see something like this
then this should be a good indication that your test has been submitted.
Check the successful receipt in the Honeybadger console. Filter your development environment as needed.
Links
source to share