Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify b3 debug flag and parent span id handling #1045

Merged
merged 4 commits into from
Oct 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions specification/context/api-propagators.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,23 @@ a community are:

### B3 Requirements

B3 has both single and multi-header encodings. To maximize compatibility between
implementations, the following guidelines have been established for B3
propagation in OpenTelemetry.
B3 has both single and multi-header encodings. It also has semantics that do not
map directly to OpenTelemetry such as a debug trace flag, and allowing spans
from both sides of request to share the same id. To maximize compatibility
between OpenTelemetry and Zipkin implementations, the following guidelines have
been established for B3 context propagation.

#### Extract

Propagators MUST attempt to extract B3 encoded using single and multi-header
formats. When extracting, the single-header variant takes precedence over
the multi-header version.
When extracting B3, propagators:

* MUST attempt to extract B3 encoded using single and multi-header
formats. The single-header variant takes precedence over
the multi-header version.
* MUST preserve a debug trace flag, if received, and propagate
it with subsequent requests. Additionally, an OpenTelemetry implementation
MUST set the sampled trace flag when the debug flag is set.
* MUST NOT reuse `X-B3-SpanId` as the id for the server-side span.

#### Inject

Expand All @@ -349,3 +357,5 @@ When injecting B3, propagators:
* MUST default to injecting B3 using the single-header format
* MUST provide configuration to change the default injection format to B3
Oberon00 marked this conversation as resolved.
Show resolved Hide resolved
multi-header
* MUST NOT propagate `X-B3-ParentSpanId` as OpenTelemetry does not support
reusing the same id for both sides of a request.