Sha256: 9d4d86f3170fcb4bf8353f9b5f7ecc4e7743e5c9ef2e390d6ec20f5e2833a48f

Contents?: true

Size: 768 Bytes

Versions: 13

Compression:

Stored size: 768 Bytes

Contents

require 'set'
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(action)
    "#{controller_name}/#{action}"
  end
  alias_method :perform_action_without_newrelic_trace, :_dispatch
  alias_method :_dispatch, :perform_action_with_newrelic_trace
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
newrelic_rpm-2.10.6 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.10.5 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.10.4 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.10.3 lib/new_relic/agent/instrumentation/merb/controller.rb
factorylabs-newrelic_rpm-2.10.2.2 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.9.9 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.9.8 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.9.6 lib/new_relic/agent/instrumentation/merb/controller.rb
genki-newrelic_rpm-2.10.1 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.9.5 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.9.2 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.9.3 lib/new_relic/agent/instrumentation/merb/controller.rb
newrelic_rpm-2.9.4 lib/new_relic/agent/instrumentation/merb/controller.rb