baggage
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package baggage provides base types and functionality to store and retrievebaggage in Go context. This package exists because the OpenTracing bridge toOpenTelemetry needs to synchronize state whenever baggage for a context ismodified and that context contains an OpenTracing span. If it were not forthis need this package would not need to exist and the`go.opentelemetry.io/otel/baggage` package would be the singular place whereW3C baggage is handled.
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcContextWithGetHook¶
func ContextWithGetHook(parentcontext.Context, hookGetHookFunc)context.Context
ContextWithGetHook returns a copy of parent with hook configured to beinvoked every time FromContext is called.
Passing nil GetHookFunc creates a context with no get hook to call.
funcContextWithList¶added inv1.0.0
ContextWithList returns a copy of parent with baggage. Passing nil listreturns a context without any baggage.
funcContextWithSetHook¶
func ContextWithSetHook(parentcontext.Context, hookSetHookFunc)context.Context
ContextWithSetHook returns a copy of parent with hook configured to beinvoked every time ContextWithBaggage is called.
Passing nil SetHookFunc creates a context with no set hook to call.
Types¶
typeGetHookFunc¶
GetHookFunc is a callback called when getting baggage from the context.
typeList¶added inv1.0.0
List is the collection of baggage members. The W3C allows for duplicates,but OpenTelemetry does not, therefore, this is represented as a map.
funcListFromContext¶added inv1.0.0
ListFromContext returns the baggage contained in ctx.