Module: NewRelic::Agent::Instrumentation::Rails3::ActionController

Defined in:
lib/new_relic/agent/instrumentation/rails3/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#newrelic_metric_path(action_name_override = nil) ⇒ Object

determine the path that is used in the metric name for the called controller action



14
15
16
17
18
19
20
21
# File 'lib/new_relic/agent/instrumentation/rails3/action_controller.rb', line 14

def newrelic_metric_path(action_name_override = nil)
  action_part = action_name_override || action_name
  if action_name_override || self.class.action_methods.include?(action_part)
    "#{self.class.controller_path}/#{action_part}"
  else
    "#{self.class.controller_path}/(other)"
  end
end

#process_action(*args) ⇒ Object

THREAD_LOCAL_ACCESS



23
24
25
26
27
28
29
30
31
32
# File 'lib/new_relic/agent/instrumentation/rails3/action_controller.rb', line 23

def process_action(*args) # THREAD_LOCAL_ACCESS
  munged_params = NewRelic::Agent::ParameterFiltering.filter_rails_request_parameters(request.filtered_parameters)
  perform_action_with_newrelic_trace(:category => :controller,
    :name => self.action_name,
    :path => newrelic_metric_path,
    :params => munged_params,
    :class_name => self.class.name) do
    super
  end
end