-
Notifications
You must be signed in to change notification settings - Fork 714
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
Negative hex spanIds #39
Comments
@henrikno you are right. I wrote a test and we are incompatible with zipkin / finagle when negative span ids are generated. I'll look into you suggestions. |
I can fix it by using following guava parsing/conversion utilities (part of From Long to String:
This makes it compatible with Zipkin/Finagle. I tested with positive and negative long values. Apparently this bug is fixed in Java 8. |
This issue is fixed as part of brave 2.4 which is just released and should become available through Maven Central in a few hours. |
Currently you can get negative span ids like this: -140dcf65fae75f53
I don't think this is compatible with zipkin, e.g. if a zipkin/finagle client calls a brave service (tell me if I'm wrong here).
I think we should use Long.toHexString when we serialize span/traceIds, and Long.parseUnsignedLong when deserializing them, or some similar method.
See how finagle generates ids:
https://github.com/twitter/finagle/blob/master/finagle-core/src/main/scala/com/twitter/finagle/tracing/Id.scala
The text was updated successfully, but these errors were encountered: