class ElasticAPM::Transaction

def initialize(

rubocop:disable Metrics/MethodLength
def initialize(
  instrumenter,
  name = nil,
  type = nil,
  context: nil,
  sampled: true
)
  @id = SecureRandom.uuid
  @instrumenter = instrumenter
  @name = name
  @type = type || DEFAULT_TYPE
  @timestamp = Util.micros
  @spans = []
  @span_id_ticker = -1
  @dropped_spans = 0
  @notifications = [] # for AS::Notifications
  @context = context || Context.new
  @sampled = sampled
  yield self if block_given?
end