package propagation

Import Path
	go.opentelemetry.io/otel/api/propagation (on go.dev)

Dependency Relation
	imports one package, and imported by 5 packages

Involved Source Files Package propagation contains interface definition for HTTP propagators. propagation.go
Package-Level Type Names (total 8, in which 7 are exported)
/* sort exporteds by: | */
Config contains the current set of extractors and injectors.
HTTPExtractor extracts information from a HTTPSupplier into a context. Extract method retrieves encoded information using supplier from the associated carrier, decodes it and creates a new context containing the decoded information. Information can be a correlation context or a remote span context. In case of span context, the propagator should store it in the context using trace.ContextWithRemoteSpanContext. In case of correlation context, the propagator should use correlation.WithMap to store it in the context. HTTPPropagator (interface) go.opentelemetry.io/otel/api/correlation.CorrelationContext go.opentelemetry.io/otel/api/trace.B3 go.opentelemetry.io/otel/api/trace.TraceContext func Propagators.HTTPExtractors() []HTTPExtractor func go.opentelemetry.io/otel.Propagators.HTTPExtractors() []HTTPExtractor func WithExtractors(ext ...HTTPExtractor) Option
HTTPInjector injects information into a HTTPSupplier. Inject method retrieves information from the context, encodes it into propagator specific format and then injects the encoded information using supplier into an associated carrier. HTTPPropagator (interface) go.opentelemetry.io/otel/api/correlation.CorrelationContext go.opentelemetry.io/otel/api/trace.B3 go.opentelemetry.io/otel/api/trace.TraceContext func Propagators.HTTPInjectors() []HTTPInjector func go.opentelemetry.io/otel.Propagators.HTTPInjectors() []HTTPInjector func WithInjectors(inj ...HTTPInjector) Option
HTTPPropagator is the interface to inject to and extract from HTTPSupplier. Extract method retrieves encoded information using supplier from the associated carrier, decodes it and creates a new context containing the decoded information. Information can be a correlation context or a remote span context. In case of span context, the propagator should store it in the context using trace.ContextWithRemoteSpanContext. In case of correlation context, the propagator should use correlation.WithMap to store it in the context. GetAllKeys returns the HTTP header names used. Inject method retrieves information from the context, encodes it into propagator specific format and then injects the encoded information using supplier into an associated carrier. go.opentelemetry.io/otel/api/correlation.CorrelationContext go.opentelemetry.io/otel/api/trace.B3 go.opentelemetry.io/otel/api/trace.TraceContext T : HTTPExtractor T : HTTPInjector func go.opentelemetry.io/otel/api/correlation.DefaultHTTPPropagator() HTTPPropagator func go.opentelemetry.io/otel/api/trace.DefaultHTTPPropagator() HTTPPropagator
HTTPSupplier is an interface that specifies methods to retrieve and store a single value for a key to an associated carrier. It is implemented by http.Headers. Get method retrieves a single value for a given key. Set method stores a single value for a given key. Note that this should not be appending a value to some array, but rather overwrite the old value. google.golang.org/api/internal/gensupport.URLParams net/http.Header net/textproto.MIMEHeader net/url.Values T : github.com/go-redis/redis/v8.ConsistentHash func ExtractHTTP(ctx context.Context, props Propagators, supplier HTTPSupplier) context.Context func InjectHTTP(ctx context.Context, props Propagators, supplier HTTPSupplier) func HTTPExtractor.Extract(context.Context, HTTPSupplier) context.Context func HTTPInjector.Inject(context.Context, HTTPSupplier) func HTTPPropagator.Extract(context.Context, HTTPSupplier) context.Context func HTTPPropagator.Inject(context.Context, HTTPSupplier) func go.opentelemetry.io/otel/api/correlation.CorrelationContext.Extract(ctx context.Context, supplier HTTPSupplier) context.Context func go.opentelemetry.io/otel/api/correlation.CorrelationContext.Inject(ctx context.Context, supplier HTTPSupplier) func go.opentelemetry.io/otel/api/trace.B3.Extract(ctx context.Context, supplier HTTPSupplier) context.Context func go.opentelemetry.io/otel/api/trace.B3.Inject(ctx context.Context, supplier HTTPSupplier) func go.opentelemetry.io/otel/api/trace.TraceContext.Extract(ctx context.Context, supplier HTTPSupplier) context.Context func go.opentelemetry.io/otel/api/trace.TraceContext.Inject(ctx context.Context, supplier HTTPSupplier)
Option support passing configuration parameters to New(). func WithExtractors(ext ...HTTPExtractor) Option func WithInjectors(inj ...HTTPInjector) Option func New(options ...Option) Propagators
Propagators is the interface to a set of injectors and extractors for all supported carrier formats. It can be used to chain multiple propagators into a single entity. HTTPExtractors returns the configured extractors. HTTPInjectors returns the configured injectors. func New(options ...Option) Propagators func go.opentelemetry.io/otel/api/global.Propagators() Propagators func go.opentelemetry.io/otel/api/global/internal.Propagators() Propagators func ExtractHTTP(ctx context.Context, props Propagators, supplier HTTPSupplier) context.Context func InjectHTTP(ctx context.Context, props Propagators, supplier HTTPSupplier) func go.opentelemetry.io/otel/api/global.SetPropagators(p Propagators) func go.opentelemetry.io/otel/api/global/internal.SetPropagators(pr Propagators)
Package-Level Functions (total 5, all are exported)
ExtractHTTP applies props.HTTPExtractors() to the passed context and the supplier and returns the combined result context.
InjectHTTP applies props.HTTPInjectors() to the passed context and the supplier.
New returns a standard Propagators implementation.
WithExtractors appends to the optional extractor set.
WithInjectors appends to the optional injector set.