Skip to content
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

[Haystack Client Java] Improve the trace/span id generation time. #705

Closed
doctorXWrites opened this issue Apr 15, 2019 · 2 comments
Closed

Comments

@doctorXWrites
Copy link
Contributor

doctorXWrites commented Apr 15, 2019

Currently the performance of haystack client is approx. 4 times less than jaegar in terms of throughput https://github.com/gsoria/opentracing-java-benchmark.

Cause:
Upon investigation this was mainly attributed to the UUID generation for trace and span id's while creating the context.

Possible Fix:
Make TraceId be generated by an external function which can be passed by clients. We will provide two default implementations with one using Long random number generator and the other using the current random UUID generator.
Also make span id to always use Long or maybe use the same external function used for trace id for this also.

@ashishagg
Copy link
Contributor

Thanks for working on this @doctorXWrites and @keshavpeswani .
Letting consumers define their own generators and providing a sensible default will be a good approach.

@nsahai8
Copy link
Contributor

nsahai8 commented May 27, 2019

In release 0.2.8, have added the implementation in the client, enabling the consumers to add their own generators. Also, have added three default generators that could be used and have benchmarked the results using each of them. Consumers now can also check the results, the steps for that are added in README.md .

@nsahai8 nsahai8 closed this as completed May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants