Documentation ¶
Overview ¶
Package transform implements mappings from OTLP to DD semantics, and helpers
Index ¶
- func GetFirstFromMap(m map[string]string, keys ...string) (string, string)
- func MarshalEvents(events ptrace.SpanEventSlice) string
- func MarshalLinks(links ptrace.SpanLinkSlice) string
- func OtelSpanToDDSpan(otelspan ptrace.Span, otelres pcommon.Resource, ...) *pb.Span
- func OtelSpanToDDSpanMinimal(otelspan ptrace.Span, otelres pcommon.Resource, ...) *pb.Span
- func SetMetaOTLP(s *pb.Span, k, v string)
- func SetMetricOTLP(s *pb.Span, k string, v float64)
- func Status2Error(status ptrace.Status, events ptrace.SpanEventSlice, span *pb.Span)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFirstFromMap ¶
GetFirstFromMap checks each key in the given keys in the map and returns the first key-value pair whose key matches, or empty strings if none matches.
func MarshalEvents ¶
func MarshalEvents(events ptrace.SpanEventSlice) string
MarshalEvents marshals events into JSON.
func MarshalLinks ¶
func MarshalLinks(links ptrace.SpanLinkSlice) string
MarshalLinks marshals span links into JSON.
func OtelSpanToDDSpan ¶
func OtelSpanToDDSpan( otelspan ptrace.Span, otelres pcommon.Resource, lib pcommon.InstrumentationScope, conf *config.AgentConfig, peerTagKeys []string, ) *pb.Span
OtelSpanToDDSpan converts an OTel span to a DD span.
func OtelSpanToDDSpanMinimal ¶
func OtelSpanToDDSpanMinimal( otelspan ptrace.Span, otelres pcommon.Resource, lib pcommon.InstrumentationScope, isTopLevel, topLevelByKind bool, conf *config.AgentConfig, peerTagKeys []string, ) *pb.Span
OtelSpanToDDSpanMinimal otelSpanToDDSpan converts an OTel span to a DD span. The converted DD span only has the minimal number of fields for APM stats calculation and is only meant to be used in OTLPTracesToConcentratorInputs. Do not use them for other purposes.
func SetMetaOTLP ¶
SetMetaOTLP sets the k/v OTLP attribute pair as a tag on span s.
func SetMetricOTLP ¶
SetMetricOTLP sets the k/v OTLP attribute pair as a metric on span s.
func Status2Error ¶
Status2Error checks the given status and events and applies any potential error and messages to the given span attributes.
Types ¶
This section is empty.