class ElasticAPM::Transport::Serializers::SpanSerializer
@api private
def build(span)
def build(span) { span: { id: span.id, transaction_id: span.transaction.id, parent_id: span.parent_id, name: keyword_field(span.name), type: join_type(span), duration: ms(span.duration), context: context_serializer.build(span.context), stacktrace: span.stacktrace.to_a, timestamp: span.timestamp, trace_id: span.trace_id, sample_rate: span.sample_rate, outcome: keyword_field(span.outcome) } } end
def initialize(config)
def initialize(config) super @context_serializer = ContextSerializer.new(config) end
def join_type(span)
def join_type(span) combined = [span.type, span.subtype, span.action] combined.compact! combined.join '.' end