Skip to content

Instantly share code, notes, and snippets.

@pauldix
Created November 13, 2012 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pauldix/4068851 to your computer and use it in GitHub Desktop.
Save pauldix/4068851 to your computer and use it in GitHub Desktop.
Using Errplane metrics to set up custom thresholding on exception notifications
Errplane.configure do |config|
config.define_custom_exception_data do |black_box|
if black_box.exception.class == ZeroDivisionError
Errplane.report("important_exceptions/#{black_box.exception.class.to_s}")
end
# or just report on all of them and sort it out in the errplane web app
Errplane.report("exception_classes/#{black_box.exception.class.to_s}",
:message => "{Rails.env} - #{black_box.exception.class.to_s} - #{black_box.request_data.to_json}")
# then you can set up alerts on important_exceptions as a whole, or on the individual classes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment