Sha256: 0a7dda9224359ec8dae16879a43751f94ceb37af57ad6ca9264a7272dc399624

Contents?: true

Size: 725 Bytes

Versions: 13

Compression:

Stored size: 725 Bytes

Contents

DependencyDetection.defer do
  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

    # 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

13 entries across 13 versions & 2 rubygems

Version Path
ghazel-newrelic_rpm-3.1.0.1 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0.beta5 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0.beta4 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0.djlogging2 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0.djlogging lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0.beta3 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0.beta2 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.0.1 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.1.0.beta1 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.0.0 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.0.0.beta2 lib/new_relic/agent/instrumentation/merb/errors.rb
newrelic_rpm-3.0.0.beta1 lib/new_relic/agent/instrumentation/merb/errors.rb