class ElasticAPM::Transaction
def initialize(
def initialize( name = nil, type = nil, sampled: true, context: nil, config:, trace_context: nil ) @name = name @type = type || DEFAULT_TYPE @config = config @sampled = sampled @context = context || Context.new # TODO: Lazy generate this? if config.default_labels Util.reverse_merge!(@context.labels, config.default_labels) end @trace_context = trace_context || TraceContext.new(recorded: sampled) @started_spans = 0 @dropped_spans = 0 @notifications = [] # for AS::Notifications end