Modification to Honeybadger gem that allows notifying multiple honeybadger projects from single Rails project.
Add this line to your application's Gemfile:
gem 'honeybadger-ruby-splitproject', :github =>'ThinkNear/honeybadger-ruby-splitproject'
And then execute:
$ bundle
Or install it yourself as:
$ gem install honeybadger-ruby-splitproject
By default, all errors go to normal Honeybadger account. If no environment key is specified, it will not add any extra methods
- Add to initializers:
require 'honeybadger/splitproject'
Honeybadger::Splitproject.add_notifiers_for_team("[team name]")
- Add environment variable with key "HONEYBADGER_API_KEY_[TEAM NAME]"
- "TEAM" must be uppercase with no spaces.
- e.g. If [team name] = "big team", the environment key name = "HONEYBADGER_API_KEY_BIGTEAM"
- On Heroku:
heroku config:add HONEYBADGER_API_KEY_BIGTEAM="[Honeybadger key]"
- The following extra methods will be available (for team "big team")
Honeybadger.notify_detailed(class_name, error_message, options)
- new method for "default Honeybadger account"Honeybadger.notify_bigteam
- delegates to Honeybadger.notify with different API keyHoneybadger.notify_detailed_bigteam(class_name, error_message, options)
- Add alert_team option to sidekiq options, to alert specific team.
- e.g. sidekiq_options :queue => :main, :alert_team => "rex"
- Fork it ( https://github.com/[my-github-username]/honeybadger-ruby-splitproject/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request