Sha256: c4960dbab0401357b2060a80e7f511148e5015ab383b2ae4a1ec3fab937f7ae4
Contents?: true
Size: 847 Bytes
Versions: 61
Compression:
Stored size: 847 Bytes
Contents
DependencyDetection.defer do @name = :merb_error depends_on do defined?(Merb) && defined?(Merb::Dispatcher) && defined?(Merb::Dispatcher::DefaultException) end depends_on do Merb::Dispatcher::DefaultException.respond_to?(:before) end executes do NewRelic::Agent.logger.debug 'Installing Merb Errors instrumentation' end executes do # Hook in the notification to merb error_notifier = Proc.new { if request.exceptions #check that there's actually an exception # Note, this assumes we have already captured the other information such as uri and params in the MetricFrame. NewRelic::Agent::Instrumentation::MetricFrame.notice_error(request.exceptions.first) end } Merb::Dispatcher::DefaultException.before error_notifier Exceptions.before error_notifier end end
Version data entries
61 entries across 61 versions & 4 rubygems