module BaselineRedRpm::Instruments::ActionController
Public Instance Methods
perform_action_with_trace(*arguments)
click to toggle source
# 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)
click to toggle source
# 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.message.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