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

LongIdGenerator is not properly supported #105

Closed
amcghie opened this issue Jun 5, 2019 · 2 comments
Closed

LongIdGenerator is not properly supported #105

amcghie opened this issue Jun 5, 2019 · 2 comments

Comments

@amcghie
Copy link
Contributor

amcghie commented Jun 5, 2019

The LongIdGenerator was introduced in commit #b93f6685 however there are still numerous places in the code that assume that traceId is a UUID:

For example in the TextMapPropagator#extract(TextMap carrier) method the following code exists (which assumes the traceId, spanId and parentId are all UUID's):

        SpanContext context = new SpanContext(UUID.fromString(traceId),
                                              UUID.fromString(spanId),
                                              parentId == null ? null : UUID.fromString(parentId),
                                              true);

When the LongIdGenerator is used (in a client) the following error occurs:

Error handling a request: 9747e8d6c092bd0b
! java.lang.IllegalArgumentException: Invalid UUID string: 1560033070049436460
! at java.util.UUID.fromString(UUID.java:194)
! at com.expedia.www.haystack.client.propagation.TextMapPropagator.extract(TextMapPropagator.java:101)
! at com.expedia.www.haystack.client.propagation.TextMapPropagator.extract(TextMapPropagator.java:30)
! at com.expedia.www.haystack.client.Tracer.extract(Tracer.java:185)
! at com.expedia.www.haystack.client.Tracer.extract(Tracer.java:43)
! at io.opentracing.contrib.jaxrs2.server.ServerTracingFilter.parentSpanContext(ServerTracingFilter.java:99)
! at io.opentracing.contrib.jaxrs2.server.ServerTracingFilter.filter(ServerTracingFilter.java:68)
! at org.glassfish.jersey.server.ContainerFilteringStage.apply(ContainerFilteringStage.java:132)
<snip>

This can be easily replicated by running the example in https://github.com/ExpediaDotCom/haystack-dropwizard-example

There is also a reference to UUID.randomUUID() on Line 327 in Tracer.java which should be replaced by tracer.idGenerator.generate()

@amcghie
Copy link
Contributor Author

amcghie commented Jun 5, 2019

Is it possible to get a rough idea of a release timeframe for 0.2.9?

@nsahai8
Copy link

nsahai8 commented Jul 29, 2019

The issue is fixed in release 0.2.9

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

No branches or pull requests

2 participants