11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/metrician/reporters/honeybadger.rb', line 11
def instrument
return if ::Honeybadger::Agent.method_defined?(:notify_with_metrician)
::Honeybadger::Agent.class_eval do
def notify_with_metrician(exception, options = {})
notify_without_metrician(exception, options)
ensure
Metrician.increment(EXCEPTION_METRIC) if Metrician.configuration[:exception][:raise][:enabled]
Metrician.increment("#{EXCEPTION_METRIC}.#{Metrician.dotify(exception.class.name.underscore)}") if exception && Metrician.configuration[:exception][:exception_specific][:enabled]
end
alias_method :notify_without_metrician, :notify
alias_method :notify, :notify_with_metrician
end
end
|