Review namespace and organization of Baggage APIs
See original GitHub issueThe specification suggests Baggage as a top-level API https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/library-layout.md#api-package.
Currently Baggage
is in the OpenTelemetry
namespace https://github.com/open-telemetry/opentelemetry-dotnet/blob/fe2476852131c3bc3a4b5b190cd5970cf46059a9/src/OpenTelemetry.Api/Baggage.cs#L22-L31
and the BaggagePropagator
is in the OpenTelemetry.Context.Propagation
namespace https://github.com/open-telemetry/opentelemetry-dotnet/blob/fe2476852131c3bc3a4b5b190cd5970cf46059a9/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs#L24-L30
The spec seems to suggest something more like:
namespace OpenTelemetry.Baggage
{
public readonly struct Baggage : IEquatable<Baggage>
{
and
namespace OpenTelemetry.Baggage.Propagation
{
public class BaggagePropagator : TextMapPropagator
{
OpenTelemetry.Baggage.Baggage kinda feels ewwwww… 🥴
I’m not familiar enough with baggage to know what kind of thought went into the organization we have. Hoping for other’s input. @CodeBlanch @reyang @cijothomas
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Agree its slightly more correct to have Baggage under Context. But the benefit is small compared to making a last minute change.
Closing this as we have reached 1.0 and no breaking changes can be made.