-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Don't break on 128bit X-B3-TraceId by tossing high bits #552
Comments
+@mosesn |
@adriancole what's the expected migration strategy? use a zipkin which writes all 128 bits, but only uses 64, then when everyone is switched over, cut over? |
Main thing is the transition design is made to have no impact until 128bit |
#553 I just converted java to scala.. hope it looks alright. |
@adriancole fixed this back in #553, thanks! |
We want to phase in 128bit trace ids per See openzipkin/b3-propagation#6. The first step is not breaking if a longer trace id is found in an http header.
Expected behavior
The first step of transitioning to 128bit
X-B3-TraceId
is tolerantly reading 32 character long ids by throwing away the high bits (any characters left of 16 characters). This allows the tracing system to more flexibly introduce 128bit trace id support in the future.Ex. when
X-B3-TraceId: 463ac35c9f6413ad48485a3953bb6124
is received, parse the lower 64 bits (right most 16 characters ex48485a3953bb6124) as the trace id.Actual behavior
Right now, the http codec parses the
X-B3-TraceId
header viaSpanId.fromString
.We could either change this to toss left-most characters over 16, or define a new function for parsing a trace id. For example, like this:
Steps to reproduce the behavior
Once this is in, we should be able to test by ensuring that the following parse the same value:
X-B3-TraceId: 463ac35c9f6413ad48485a3953bb6124
X-B3-TraceId: 48485a3953bb6124
The text was updated successfully, but these errors were encountered: