Method: OneApm::Support::TracedMethodStack#push_frame

Defined in:
lib/one_apm/support/traced_method_stack.rb

#push_frame(state, tag, time = Time.now.to_f) ⇒ Object

Pushes a frame onto the transaction stack - this generates a TransactionSample::Segment at the end of transaction execution.

The generated segment won’t be named until pop_frame is called.

tag should be a Symbol, and is only for debugging purposes to identify this frame if the stack gets corrupted.



36
37
38
39
40
41
# File 'lib/one_apm/support/traced_method_stack.rb', line 36

def push_frame(state, tag, time = Time.now.to_f)
  transaction_sampler.notice_push_frame(state, time) if sampler_enabled?
  frame = TracedMethodFrame.new(tag, time)
  @stack.push frame
  frame
end