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/otlploggrpc
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
|
|
|
logtest
module
|
|
|
metric
module
|
|
|
x
module
|
|
|
oteltest
module
|
|
|
Package propagators contains OpenTelemetry context propagators.
|
Package propagators contains OpenTelemetry context propagators. |
|
schema
module
|
|
|
sdk
module
|
|
|
export/metric
module
|
|
|
log
module
|
|
|
log/logtest
module
|
|
|
metric
module
|
|
|
metric/x
module
|
|
|
trace/x
module
|
|
|
Package semconv implements OpenTelemetry semantic conventions.
|
Package semconv implements OpenTelemetry semantic conventions. |
|
trace
module
|
|
|
internal/telemetry/test
module
|
|
|
Package unit provides units.
|
Package unit provides units. |