Module: NewRelic::Agent::InfiniteTracing::Transformer

Extended by:
Transformer
Included in:
Transformer
Defined in:
lib/infinite_tracing/transformer.rb

Instance Method Summary collapse

Instance Method Details

#transform(span_event) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/infinite_tracing/transformer.rb', line 10

def transform(span_event)
  intrinsics, user_attributes, agent_attributes = span_event
  {
    'trace_id' => intrinsics[NewRelic::Agent::SpanEventPrimitive::TRACE_ID_KEY],
    'intrinsics' => hash_to_attributes(intrinsics),
    'user_attributes' => hash_to_attributes(user_attributes),
    'agent_attributes' => hash_to_attributes(agent_attributes)
  }
end