Back to godoc.org
go.opentelemetry.io/otel

Package otel

v0.13.0
Latest Go to latest

The highest tagged major version is .

Published: Oct 8, 2020 | License: Apache-2.0 | Module: go.opentelemetry.io/otel

Overview

Package otel contains OpenTelemetry Go packages.

Index

func Baggage

func Baggage(ctx context.Context) label.Set

Baggage returns a copy of the baggage in ctx.

func BaggageValue

func BaggageValue(ctx context.Context, key label.Key) label.Value

BaggageValue returns the value related to key in the baggage of ctx. If no value is set, the returned label.Value will be an uninitialized zero-value with type INVALID.

func ContextWithBaggageValues

func ContextWithBaggageValues(parent context.Context, pairs ...label.KeyValue) context.Context

ContextWithBaggageValues returns a copy of parent with pairs updated in the baggage.

func ContextWithoutBaggage

func ContextWithoutBaggage(parent context.Context) context.Context

ContextWithoutBaggage returns a copy of parent without baggage.

func ContextWithoutBaggageValues

func ContextWithoutBaggageValues(parent context.Context, keys ...label.Key) context.Context

ContextWithoutBaggageValues returns a copy of parent in which the values related to keys have been removed from the baggage.

type ErrorHandler

type ErrorHandler interface {
	// Handle handles any error deemed irremediable by an OpenTelemetry
	// component.
	Handle(error)
}

ErrorHandler handles irremediable events.

type Meter

type Meter = metric.Meter

type TextMapCarrier

type TextMapCarrier interface {
	// Get returns the value associated with the passed key.
	Get(key string) string
	// Set stores the key-value pair.
	Set(key string, value string)
}

TextMapCarrier is the storage medium used by a TextMapPropagator.

type TextMapPropagator

type TextMapPropagator interface {
	// Inject set cross-cutting concerns from the Context into the carrier.
	Inject(ctx context.Context, carrier TextMapCarrier)
	// Extract reads cross-cutting concerns from the carrier into a Context.
	Extract(ctx context.Context, carrier TextMapCarrier) context.Context
	// Fields returns the keys who's values are set with Inject.
	Fields() []string
}

TextMapPropagator propagates cross-cutting concerns as key-value text pairs within a carrier that travels in-band across process boundaries.

func NewCompositeTextMapPropagator

func NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator

NewCompositeTextMapPropagator returns a unified TextMapPropagator from the group of passed TextMapPropagator. This allows different cross-cutting concerns to be propagates in a unified manner.

The returned TextMapPropagator will inject and extract cross-cutting concerns in the order the TextMapPropagators were provided. Additionally, the Fields method will return a de-duplicated slice of the keys that are set with the Inject method.

type Tracer

type Tracer = trace.Tracer

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier