Module: OneApm::Agent::Instrumentation::Rails3::ActionController
- Defined in:
- lib/one_apm/inst/rails3/action_controller.rb
Instance Method Summary collapse
-
#oneapm_metric_path(action_name_override = nil) ⇒ Object
determine the path that is used in the metric name for the called controller action.
- #process_action(*args) ⇒ Object
Instance Method Details
#oneapm_metric_path(action_name_override = nil) ⇒ Object
determine the path that is used in the metric name for the called controller action
10 11 12 13 14 15 16 17 |
# File 'lib/one_apm/inst/rails3/action_controller.rb', line 10 def oneapm_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
19 20 21 22 23 24 25 26 27 |
# File 'lib/one_apm/inst/rails3/action_controller.rb', line 19 def process_action(*args) perform_action_with_oneapm_trace(:category => :controller, :name => self.action_name, :path => oneapm_metric_path, :params => request.filtered_parameters, :class_name => self.class.name) do super end end |