Package baggage provides functionality for storing and retrieving baggage items in Go context. For propagating the baggage, see the go.opentelemetry.io/otel/propagation package.
This package is currently in a pre-GA phase. Backwards incompatible changes may be introduced in subsequent minor version releases as we work to track the evolving OpenTelemetry specification and user feedback.
ContextWithEmpty returns a copy of parent without baggage.
ContextWithValues returns a copy of parent with pairs updated in the baggage.
ContextWithoutValues returns a copy of parent in which the values related to keys have been removed from the baggage.
Set returns a copy of the set of baggage key-values in ctx.
Value 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.