-
Notifications
You must be signed in to change notification settings - Fork 65
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
Reports 128-bit ids to Zipkin #34
Conversation
Note: this doesn't initiate 128-bit traces. This might be desired at some point. For example Brave has the following builder to do that. Note span ids in a trace are still 64-bit. Brave.Builder.traceId128Bit(true) |
Current coverage is 98.53% (diff: 81.81%)@@ master #34 diff @@
==========================================
Files 12 12
Lines 674 682 +8
Methods 0 0
Messages 0 0
Branches 121 124 +3
==========================================
+ Hits 666 672 +6
- Misses 2 3 +1
- Partials 6 7 +1
|
@@ -245,6 +245,7 @@ public void unsignedLowerHexStringToLong_throws_NumberFormatException_for_illega | |||
@Override | |||
public void call() throws Throwable { | |||
TraceAndSpanIdGenerator.unsignedLowerHexStringToLong(badHexString); | |||
TraceAndSpanIdGenerator.unsignedLowerHexStringToLong(badHexString, 0); |
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.
I don't think this line will ever be reached - the test data is setup so that it should blow up on the previous line.
ah right! ok I'll duplicate the test then? or is there a way to add another
dimension to it (i wonder)
|
@adriancole whatever you want to do is fine - feel free to duplicate the test, or add another dimension. Either way. If you want to add another dimension and you're not familiar with the
And then add the new dimension to the method args: |
This allows Wingtips to report 128-bit trace IDs to Zipkin, by parsing this high bits of a 32-character hex-encoded ID. See openzipkin/b3-propagation#6
thanks.. I rejigged the one test to show the parsing exceptions were the same regardless of offset. Then, made one that looks redundant, but I think useful to have in the context of where this is all put together. |
Looks great. I'll go through at some point and fill in the remaining code coverage - it'll be good for me to make sure I understand 100% what you added. And I added a ticket for optionally supporting 128 bit trace ID initiation. Thank you! |
thanks for the support! |
This allows Wingtips to report 128-bit trace IDs to Zipkin, by parsing
this high bits of a 32-character hex-encoded ID.
See openzipkin/b3-propagation#6