Skip to content
This repository has been archived by the owner on Oct 1, 2022. It is now read-only.

Modification to Honeybadger gem that allows notifying multiple honeybadger projects from single Rails project

License

Notifications You must be signed in to change notification settings

ThinkNear/honeybadger-ruby-splitproject

Repository files navigation

Honeybadger::Splitproject

Modification to Honeybadger gem that allows notifying multiple honeybadger projects from single Rails project.

Installation

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

Usage

By default, all errors go to normal Honeybadger account. If no environment key is specified, it will not add any extra methods

General

  1. Add to initializers:
  • require 'honeybadger/splitproject'
  • Honeybadger::Splitproject.add_notifiers_for_team("[team name]")
  1. 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]"
  1. 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 key
  • Honeybadger.notify_detailed_bigteam(class_name, error_message, options)

Sidekiq

  1. Add alert_team option to sidekiq options, to alert specific team.
  • e.g. sidekiq_options :queue => :main, :alert_team => "rex"

Contributing

  1. Fork it ( https://github.com/[my-github-username]/honeybadger-ruby-splitproject/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

Modification to Honeybadger gem that allows notifying multiple honeybadger projects from single Rails project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages