Documentation
¶
Overview ¶
Package datadog implements the Datadog APM traces compatible TextMapPropagator.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDatadogID ¶
ToDatadogID converts the ID that comes from OpenTelemetry SDK to Datadog ID.
func ToOpenTelemetryID ¶
ToOpenTelemetryID converts the ID that comes from Datadog APM traces to OpenTelemetry ID.
It may fail if the ID has invalid format.
Types ¶
type Propagator ¶
type Propagator struct{}
Propagator serializes Span Context to/from Datadog APM traces headers.
Example ¶
package main import ( "github.com/aereal/otel-propagators/datadog" "go.opentelemetry.io/otel" ) func main() { otel.SetTextMapPropagator(datadog.Propagator{}) }
Output:
func (Propagator) Extract ¶
func (Propagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context
Extract gets a context from the carrier if it contains Datadog APM traces headers.
func (Propagator) Fields ¶
func (Propagator) Fields() []string
Fields returns a list of fields used by HTTPTextFormat.
func (Propagator) Inject ¶
func (Propagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier)
Inject injects a context to the carreir following Datadog APM traces format.
Click to show internal directories.
Click to hide internal directories.