Resolve cross-module dependency of `internal/baggage`

Author: MrAliasCreated Mar 27, 2025Updated Sep 23, 2026
Labelsarea:baggage

The internal/baggage package is a dependency of baggage/opentracing. This is a cross-module internal dependency. Meaning allowed breaking changes to internal/baggage will break users that try to mix modules. This has been identified before in https://github.com/open-telemetry/opentelemetry-go/issues/3846 and is a known exception.

This issue requires investigation into a more permanent solution.

  1. Investigate if the internal/baggage can be removed. Determine if functionality can be added to baggage that allows generic wrapping of objects in a context.Context so the opentracing bridge can use this directly instead of the internal/baggage package.
  2. If a solution to remove internal/baggage cannot be determined. Find a way to add tooling that ensures this package never introduces backwards-incompatible changes.

Source: open-telemetry/opentelemetry-go