Module: BaselineRedRpm::Instruments::ActionController
- Defined in:
- lib/baseline_red_rpm/instruments/action_controller.rb
Instance Method Summary collapse
- #perform_action_with_trace(*arguments) ⇒ Object
- #process_action_with_trace(method_name, *args) ⇒ Object
Instance Method Details
#perform_action_with_trace(*arguments) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/baseline_red_rpm/instruments/action_controller.rb', line 29 def perform_action_with_trace(*arguments) if ::BaselineRedRpm::Tracer.tracing? operation = "#{@_request.path_parameters['controller']}##{@_request.path_parameters['action']}" span = BaselineRedRpm.tracer.start_span(operation, tags: { "component" => "ActionController", "span.kind" => "client" }) BaselineRedRpm::Utils.log_source_and_backtrace(span, :action_controller) end perform_action_without_trace(*arguments) rescue Exception => e if span span.set_tag('error', true) span.log_error(e) end raise ensure span.finish if span end |
#process_action_with_trace(method_name, *args) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/baseline_red_rpm/instruments/action_controller.rb', line 6 def process_action_with_trace(method_name, *args) if ::BaselineRedRpm::Tracer.tracing? operation = "#{self.class.name}##{self.action_name}" span = BaselineRedRpm.tracer.start_span(operation, tags: { "component" => "ActionController", "span.kind" => "client" }) BaselineRedRpm::Utils.log_source_and_backtrace(span, :action_controller) end process_action_without_trace(method_name, *args) rescue Exception => e puts e..inspect puts e.backtrace.join("\n") if span span.set_tag('error', true) span.log_error(e) end raise ensure span.finish if span end |