Skip to content

Commit

Permalink
Rename Baggage Header name to baggage (#2003)
Browse files Browse the repository at this point in the history
* Rename Baggage Header name to baggage

* Updated CHANGELOG.md
  • Loading branch information
utpilla authored Apr 20, 2021
1 parent ca5a93d commit eb42939
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/OpenTelemetry.Api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace OpenTelemetry.Context.Propagation
/// </summary>
public class BaggagePropagator : TextMapPropagator
{
internal const string BaggageHeaderName = "Baggage";
internal const string BaggageHeaderName = "baggage";

private const int MaxBaggageLength = 8192;
private const int MaxBaggageItems = 180;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eb42939

Please sign in to comment.