Skip to content

Commit

Permalink
Update B3 header names (#881)
Browse files Browse the repository at this point in the history
* 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.

* Update Changelog
  • Loading branch information
MrAlias committed Jul 1, 2020
1 parent 2635f96 commit 8205b0b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down
16 changes: 9 additions & 7 deletions api/trace/b3_propagator.go
Expand Up @@ -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.
Expand Down

0 comments on commit 8205b0b

Please sign in to comment.