Documentation ¶
Overview ¶
Package otel contains OpenTelemetry Go packages.
Index ¶
- func Baggage(ctx context.Context) label.Set
- func BaggageValue(ctx context.Context, key label.Key) label.Value
- func ContextWithBaggageValues(parent context.Context, pairs ...label.KeyValue) context.Context
- func ContextWithoutBaggage(parent context.Context) context.Context
- func ContextWithoutBaggageValues(parent context.Context, keys ...label.Key) context.Context
- type ErrorHandler
- type Meter
- type TextMapCarrier
- type TextMapPropagator
- type Tracer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaggageValue ¶ added in v0.13.0
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 ¶ added in v0.13.0
ContextWithBaggageValues returns a copy of parent with pairs updated in the baggage.
func ContextWithoutBaggage ¶ added in v0.13.0
ContextWithoutBaggage returns a copy of parent without baggage.
Types ¶
type ErrorHandler ¶ added in v0.11.0
type ErrorHandler interface { // Handle handles any error deemed irremediable by an OpenTelemetry // component. Handle(error) }
ErrorHandler handles irremediable events.
type TextMapCarrier ¶ added in v0.13.0
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 ¶ added in v0.13.0
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 ¶ added in v0.13.0
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.
Directories ¶
Path | Synopsis |
---|---|
api
|
|
apitest
Package apitest provides utilities for testing.
|
Package apitest provides utilities for testing. |
global
Package global provides global providers, propagators and more.
|
Package global provides global providers, propagators and more. |
metric
Package metric provides support for reporting measurements using instruments.
|
Package metric provides support for reporting measurements using instruments. |
metric/metrictest
Package metrictest contains utilities for testing metrics.
|
Package metrictest contains utilities for testing metrics. |
trace
Package trace provides tracing support.
|
Package trace provides tracing support. |
trace/tracetest
Package tracetest provides testing utilities for tracing.
|
Package tracetest provides testing utilities for tracing. |
bridge
|
|
opencensus
Module
|
|
opencensus/examples/bridge
Module
|
|
opencensus/opencensusmetric
Module
|
|
opentracing
Module
|
|
Package codes defines the canonical error codes used by OpenTelemetry.
|
Package codes defines the canonical error codes used by OpenTelemetry. |
example
|
|
basic
Module
|
|
dice
Module
|
|
fib
Module
|
|
grpc
Module
|
|
http
Module
|
|
http-stackdriver
Module
|
|
jaeger
Module
|
|
namedtracer
Module
|
|
opencensus
Module
|
|
otel-collector
Module
|
|
passthrough
Module
|
|
prom-collector
Module
|
|
prometheus
Module
|
|
view
Module
|
|
zipkin
Module
|
|
exporter
|
|
metric/prometheus
Module
|
|
trace/jaeger
Module
|
|
trace/stackdriver
Module
|
|
exporters
|
|
jaeger
Module
|
|
metric/prometheus
Module
|
|
otlp
Module
|
|
otlp/internal/retry
Module
|
|
otlp/otlplog/otlploghttp
Module
|
|
otlp/otlpmetric
Module
|
|
otlp/otlptrace
Module
|
|
otlp/otlptrace/otlptracegrpc
Module
|
|
otlp/otlptrace/otlptracehttp
Module
|
|
prometheus
Module
|
|
stdout
Module
|
|
stdout/stdoutlog
Module
|
|
stdout/stdoutmetric
Module
|
|
stdout/stdouttrace
Module
|
|
trace/jaeger
Module
|
|
trace/stackdriver
Module
|
|
trace/zipkin
Module
|
|
zipkin
Module
|
|
baggage
Package baggage provides types and functions to manage W3C Baggage.
|
Package baggage provides types and functions to manage W3C Baggage. |
trace/noop
Package noop provides noop tracing implementations for tracer and span.
|
Package noop provides noop tracing implementations for tracer and span. |
metric
Module
|
|
tools
Module
|
|
Package label provides key and value labels.
|
Package label provides key and value labels. |
log
module
|
|
metric
module
|
|
oteltest
module
|
|
Package propagators contains OpenTelemetry context propagators.
|
Package propagators contains OpenTelemetry context propagators. |
schema
module
|
|
sdk
module
|
|
export/metric
Module
|
|
log
Module
|
|
metric
Module
|
|
Package semconv implements OpenTelemetry semantic conventions.
|
Package semconv implements OpenTelemetry semantic conventions. |
trace
module
|
|
Package unit provides units.
|
Package unit provides units. |