Module: AppPerfRpm::Instruments::ActionController

Defined in:
lib/app_perf_rpm/instruments/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#perform_action_with_trace(*arguments) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/app_perf_rpm/instruments/action_controller.rb', line 17

def perform_action_with_trace(*arguments)
  if ::AppPerfRpm::Tracer.tracing?
    AppPerfRpm::Tracer.trace('actioncontroller') do |span|
      span.controller = @_request.path_parameters['controller']
      span.action = @_request.path_parameters['action']

      perform_action_without_trace(*arguments)
    end
  else
    perform_action_without_trace(*arguments)
  end
end

#process_action_with_trace(method_name, *args) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/app_perf_rpm/instruments/action_controller.rb', line 4

def process_action_with_trace(method_name, *args)
  if ::AppPerfRpm::Tracer.tracing?
    AppPerfRpm::Tracer.trace('actioncontroller') do |span|
      span.controller = self.class.name
      span.action = self.action_name

      process_action_without_trace(method_name, *args)
    end
  else
    process_action_without_trace(method_name, *args)
  end
end