Sha256: bf60cd73268d350dadd5b050835dd118b228de5cf66fe5380142fd328b978165
Contents?: true
Size: 848 Bytes
Versions: 19
Compression:
Stored size: 848 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.info '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
19 entries across 19 versions & 3 rubygems