Skip to content

Instantly share code, notes, and snippets.

@malditogeek
Created July 26, 2012 11:55
Show Gist options
  • Save malditogeek/3181653 to your computer and use it in GitHub Desktop.
Save malditogeek/3181653 to your computer and use it in GitHub Desktop.
monkeypatch
# Send notifications to Airbrake asynchronously using em-http.
# Doesn't handle Airbrake conn options but works for the default settings.
module Airbrake
class Sender
def send_to_airbrake(data)
client = EM::HttpRequest.new(url)
client.post(:head => HEADERS, :body => data)
rescue => ex
p [:AIRBRAKE_ERROR, ex.message, data]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment