Created
November 13, 2012 22:25
-
-
Save pauldix/4068851 to your computer and use it in GitHub Desktop.
Using Errplane metrics to set up custom thresholding on exception notifications
This file contains 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
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