Sha256: 64ba8e68ec96c73573335c05aa2f21ad816f62b6def298d14e453e49f4eedccd

Contents?: true

Size: 964 Bytes

Versions: 13

Compression:

Stored size: 964 Bytes

Contents

require 'set'

DependencyDetection.defer do

  depends_on do
    defined?(Merb) && defined?(Merb::Controller)
  end

  executes do
    require 'merb-core/controller/merb_controller'

    Merb::Controller.class_eval do
      include NewRelic::Agent::Instrumentation::ControllerInstrumentation

      class_inheritable_accessor :do_not_trace
      class_inheritable_accessor :ignore_apdex

      def self.newrelic_write_attr(attr_name, value) # :nodoc:
        self.send "#{attr_name}=", attr_name, value
      end

      def self.newrelic_read_attr(attr_name) # :nodoc:
        self.send attr_name
      end

      protected
      # determine the path that is used in the metric name for
      # the called controller action
      def newrelic_metric_path
        "#{controller_name}/#{action_name}"
      end
      alias_method :perform_action_without_newrelic_trace, :_dispatch
      alias_method :_dispatch, :perform_action_with_newrelic_trace
    end
  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/controller.rb
newrelic_rpm-3.1.0 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.1.0.beta5 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.1.0.beta4 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.1.0.djlogging2 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.1.0.djlogging lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.1.0.beta3 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.1.0.beta2 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.0.1 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.1.0.beta1 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.0.0 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.0.0.beta2 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-3.0.0.beta1 lib/new_relic/agent/instrumentation/merb/controller.rb