class NewRelic::Agent::Instrumentation::ControllerEvent

Attributes

parent[RW]
queue_start[R]
request[R]

Public Class Methods

new(name, start, ending, transaction_id, payload, request) click to toggle source
Calls superclass method
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 71
def initialize(name, start, ending, transaction_id, payload, request)
  # We have a different initialize parameter list, so be explicit
  super(name, start, ending, transaction_id, payload)

  @request = request
  @controller_class = payload[:controller].split('::')              .inject(Object){|m,o| m.const_get(o)}

  if request && request.respond_to?(:env)
    @queue_start = QueueTime.parse_frontend_timestamp(request.env, self.time)
  end
end

Public Instance Methods

_is_filtered?(key) click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 108
def _is_filtered?(key)
  NewRelic::Agent::Instrumentation::IgnoreActions.is_filtered?(
    key,
    @controller_class,
    metric_action)
end
apdex_ignored?() click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 100
def apdex_ignored?
  _is_filtered?(ControllerInstrumentation::NR_IGNORE_APDEX_KEY)
end
enduser_ignored?() click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 104
def enduser_ignored?
  _is_filtered?(ControllerInstrumentation::NR_IGNORE_ENDUSER_KEY)
end
ignored?() click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 96
def ignored?
  _is_filtered?(ControllerInstrumentation::NR_DO_NOT_TRACE_KEY)
end
metric_action() click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 92
def metric_action
  payload[:action]
end
metric_name() click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 84
def metric_name
  @metric_name || "Controller/#{metric_path}/#{metric_action}"
end
metric_path() click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 88
def metric_path
  @controller_class.controller_path
end
to_s() click to toggle source
# File lib/new_relic/agent/instrumentation/action_controller_subscriber.rb, line 115
def to_s
  "#<NewRelic::Agent::Instrumentation::ControllerEvent:#{object_id} name: \"#{name}\" id: #{transaction_id} payload: #{payload}}>"
end