Method: OneApm::Agent::CrossAppTracingMessage.start_trace

Defined in:
lib/one_apm/agent/cross_app/cross_app_tracing_message.rb

.start_trace(state, t0, rpc_request) ⇒ Object



55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/one_apm/agent/cross_app/cross_app_tracing_message.rb', line 55

def start_trace(state, t0, rpc_request)
  state.is_cross_app_caller = true
  stack = state.traced_method_stack
  segment = stack.push_frame(state, :rpc_request, t0)
  return segment
rescue => err
  OneApm::Manager.logger.error "Uncaught exception while tracing RPC request", err
  return nil
rescue Exception => e
  OneApm::Manager.logger.debug "Unexpected exception raised while tracing RPC request", e
  raise e
end