From 07367d32c8fefe9a059712f96d9546f6dc04acd2 Mon Sep 17 00:00:00 2001 From: Utkarsh Umesan Pillai Date: Tue, 20 Apr 2021 16:19:19 -0700 Subject: [PATCH 1/2] Rename Baggage Header name to baggage --- src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs | 2 +- .../HttpClientTests.Basic.netcore31.cs | 2 +- .../HttpWebRequestActivitySourceTests.netfx.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs b/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs index 30808f642d5..cfeb5387c93 100644 --- a/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs +++ b/src/OpenTelemetry.Api/Context/Propagation/BaggagePropagator.cs @@ -28,7 +28,7 @@ namespace OpenTelemetry.Context.Propagation /// public class BaggagePropagator : TextMapPropagator { - internal const string BaggageHeaderName = "Baggage"; + internal const string BaggageHeaderName = "baggage"; private const int MaxBaggageLength = 8192; private const int MaxBaggageItems = 180; diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs index 47c74259116..317fcb24f55 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpClientTests.Basic.netcore31.cs @@ -392,7 +392,7 @@ public async Task HttpClientInstrumentationContextPropagation() Assert.True(request.Headers.TryGetValues("traceparent", out var traceparents)); Assert.True(request.Headers.TryGetValues("tracestate", out var tracestates)); - Assert.True(request.Headers.TryGetValues("Baggage", out var baggages)); + Assert.True(request.Headers.TryGetValues("baggage", out var baggages)); Assert.Single(traceparents); Assert.Single(tracestates); Assert.Single(baggages); diff --git a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs index f6a944a63af..8f42f6b59c9 100644 --- a/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs +++ b/test/OpenTelemetry.Instrumentation.Http.Tests/HttpWebRequestActivitySourceTests.netfx.cs @@ -816,7 +816,7 @@ private static void ActivityEnrichment(Activity activity, string method, object private static void ValidateBaggage(HttpWebRequest request) { - string[] baggage = request.Headers["Baggage"].Split(','); + string[] baggage = request.Headers["baggage"].Split(','); Assert.Equal(3, baggage.Length); Assert.Contains("key=value", baggage); From a39ba971e3fe8a4cbf21882fb180dd010ffed577 Mon Sep 17 00:00:00 2001 From: Utkarsh Umesan Pillai Date: Tue, 20 Apr 2021 16:29:27 -0700 Subject: [PATCH 2/2] Updated CHANGELOG.md --- src/OpenTelemetry.Api/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OpenTelemetry.Api/CHANGELOG.md b/src/OpenTelemetry.Api/CHANGELOG.md index a5cebe0542e..bc01c9e01b2 100644 --- a/src/OpenTelemetry.Api/CHANGELOG.md +++ b/src/OpenTelemetry.Api/CHANGELOG.md @@ -9,6 +9,10 @@ please check the latest changes ## Unreleased +* `BaggagePropagator` now uses `baggage` as the header name instead of `Baggage` + to `Extract` from and `Inject` to `carrier` + ([#2003](https://github.com/open-telemetry/opentelemetry-dotnet/pull/2003)) + ## 1.1.0-beta1 Released 2021-Mar-19