From f92be2e998f5c63f5270fef9602e6dc4dd14b46d Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 30 Jun 2020 14:30:39 -0700 Subject: [PATCH 1/2] Update B3 header names Correct the B3 single header name from `X-B3` to `b3`. Use the lowercase version of the B3 multiple headers. This is based on the fact that HTTP headers are case-insensitive, however, other protocols may not be. --- api/trace/b3_propagator.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/api/trace/b3_propagator.go b/api/trace/b3_propagator.go index 6f5b15986ba..e0c96e9b97c 100644 --- a/api/trace/b3_propagator.go +++ b/api/trace/b3_propagator.go @@ -23,13 +23,15 @@ import ( ) const ( - B3SingleHeader = "X-B3" - B3DebugFlagHeader = "X-B3-Flags" - B3TraceIDHeader = "X-B3-TraceId" - B3SpanIDHeader = "X-B3-SpanId" - B3SampledHeader = "X-B3-Sampled" - B3ParentSpanIDHeader = "X-B3-ParentSpanId" - b3TraceIDPadding = "0000000000000000" + // Default B3 Header names. + B3SingleHeader = "b3" + B3DebugFlagHeader = "x-b3-flags" + B3TraceIDHeader = "x-b3-traceid" + B3SpanIDHeader = "x-b3-spanid" + B3SampledHeader = "x-b3-sampled" + B3ParentSpanIDHeader = "x-b3-parentspanid" + + b3TraceIDPadding = "0000000000000000" ) // B3 propagator serializes SpanContext to/from B3 Headers. From a8460da4b72a5b3d4af4d8e178febdab5dd55b1f Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Tue, 30 Jun 2020 14:39:48 -0700 Subject: [PATCH 2/2] Update Changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cde178ab25..037d5043d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,11 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Changed - Update `CONTRIBUTING.md` to ask for updates to `CHANGELOG.md` with each pull request. (#879) +- Use lowercase header names for B3 Multiple Headers. (#881) + +### Fixed + +- The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881) ## [0.7.0] - 2020-06-26