Created
January 26, 2013 23:14
-
-
Save hakanensari/4645235 to your computer and use it in GitHub Desktop.
Honeybadger initializer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Honeybadger.configure do |config| | |
config.api_key = '12345678' | |
config.ignore.push "SignalException::SIGTERM", | |
"Excon::Errors::ServiceUnavailable", | |
"Excon::Errors::SocketError", | |
"Excon::Errors::Timeout" | |
config.async do |notice| | |
WorkingBadger.perform_async(notice.to_json) unless notice.ignore? | |
end | |
end | |
class WorkingBadger | |
include Sidekiq::Worker | |
def perform(notice) | |
Honeybadger.sender.send_to_honeybadger(notice) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment