linkerd

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

README

otel-linkerd

OpenTelemetry linkerd trace propagator.

Currently supports l5d-tctx-trace set by telemetry: io.l5d.tracelog.

Usage

import (
  otelhttp "go.opentelemetry.io/contrib/instrumentation/net/http"
)

var httpClient = http.Client{Transport: otelhttp.NewTransport(
    http.DefaultTransport,
    // ...
    otelhttp.WithPropagators(linkerd.New()),
),
}

License

license

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Propagator

type Propagator struct{}

func (Propagator) Extract

Extract gets a context from the carrier if it contains linkerd trace header.

func (Propagator) Fields

func (l5d Propagator) Fields() []string

Fields returns list of fields used by HTTPTextFormat.

func (Propagator) Inject

func (l5d Propagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier)

Inject injects a context to the carrier following linkerd trace format.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL