-
Notifications
You must be signed in to change notification settings - Fork 375
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
B3 Header Support #753
B3 Header Support #753
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start overall. I think we might want to shuffle around some things while we have an opportunity to.
I'd also like to suggest that we consider making propagation styles a bit more modular, so that users with a need to define custom propagation have an API to do so. Even if this is might be a bit out of scope, then API changes we're putting in place here should at least be congruent with a plugin-friendly API, so we don't introduce breaking changes if we want to do so later.
I skipped on reviewing the tests until other changes are resolved.
# Truncate to trailing 16 characters if length is greater than 16 | ||
# https://github.com/apache/incubator-zipkin/blob/21fe362899fef5c593370466bc5707d3837070c2/zipkin/src/main/java/zipkin2/storage/StorageComponent.java#L49-L53 | ||
# DEV: This ensures we truncate B3 128-bit trace and span ids to 64-bit | ||
value = value[value.length - 16, 16] if value.length > 16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR adds support for parsing B3 headers for distributed tracing, including B3 single header.
We add two new configuration options:
propagation_extract_style
andpropagation_inject_style
which define which header formats we will try to parse and which we will inject into headers.By default we will attempt to parse every supported type of header. However, we only accept the propagated context if the values being propagated match, for example if we parse a different trace id from Datadog headers vs B3 headers then we do not use the context created.
By default we will only inject Datadog headers.