-
Notifications
You must be signed in to change notification settings - Fork 100
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
WIP: Support for 128 bit TraceIDs #31
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.
looks great!
this PR has been tested with 64 bit traceID Zipkin instance and is backwards compatible if tracing with 128 bit traceIDs by simply having the high bits of the traceID be ignored. Sampling functionality is also solely on the low 64 bits. This PR will be merged once Zipkin backend supports 128 bit TraceIDs. |
be388ad
to
6e96c18
Compare
I ran the example against snapshot zipkin and looks great!
|
ps for those unacclimated, here's what I did to test..
|
awesome... sounds like merge time to me! |
Traditionally, Zipkin trace IDs were 64-bit. Starting with Zipkin 1.14, 128-bit trace identifiers are supported. This can be useful in sites that have very large traffic volume, persist traces forever, or are re-using externally generated 128-bit IDs. If you want Brave to generate 128-bit trace identifiers when starting new root spans, set `Brave.Builder.traceId128Bit(true)` When 128-bit trace ids are propagated, they will be twice as long as before. For example, the `X-B3-TraceId` header will hold a 32-character value like `163ac35c9f6413ad48485a3953bb6124`. Before doing this, ensure your Zipkin setup is up-to-date, and downstream instrumented services can read the longer 128-bit trace IDs. Note: this only affects the trace ID, not span IDs. For example, span ids within a trace are always 64-bit. See openzipkin/zipkin#1298 See openzipkin-contrib/zipkin-go-opentracing#31
…rtcard Minor fixes to appease formatting and linting tools.
This PR handles the ability of the tracer to work with 128 bit TraceIDs.
See: openzipkin/zipkin#1298