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

Zipkin trace is not continued #3

Closed
hkroger opened this issue Oct 23, 2016 · 7 comments
Closed

Zipkin trace is not continued #3

hkroger opened this issue Oct 23, 2016 · 7 comments

Comments

@hkroger
Copy link

hkroger commented Oct 23, 2016

I'm testing out the cassandra-zipkin-tracing and I have an issue with custom payload. The application sends out the trace and custom payload existence is shown by the datastax driver:

18:39:46.888 [cluster1-nio-worker-1] TRACE com.datastax.driver.core.Message - Sending payload: {zipkin:0xBC32132774C4F39C36FD63672F7858D4138574D4E7701F030000000000000000} (44 bytes total)
18:39:46.888 [cluster1-nio-worker-1] TRACE com.datastax.driver.core.Connection - Connection[/127.0.0.1:9043-2, inFlight=1, closed=false], stream 16192, request sent successfully
18:39:46.892 [cluster1-nio-worker-1] TRACE com.datastax.driver.core.Message - Received payload: {zipkin:0xBC32132774C4F39C36FD63672F7858D4138574D4E7701F030000000000000000} (44 bytes total)

However when I added some logging as seen in the PR that I created (https://github.com/thelastpickle/cassandra-zipkin-tracing/pull/2/files), I'm getting only

TRACE [Native-Transport-Requests-3] 2016-10-23 15:42:07,465 ZipkinTracing.java:104 - No customPayload in zipkin

I'm running Cassandra 3.9 and using prepared statements (using the object mapper).

Is it a problem with Cassandra? Cassandra driver is 3.1.1.

@hkroger
Copy link
Author

hkroger commented Oct 23, 2016

Hmm, might be related to https://issues.apache.org/jira/browse/CASSANDRA-11706.

@michaelsembwever
Copy link
Member

@hkroger And you are sure that cassandra is running with -Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler ?

@hkroger
Copy link
Author

hkroger commented Oct 24, 2016

Yes, it turned out to be the bug in the Cassandra 3.9. It works fine with 3.10.SNAPSHOT.

@hkroger
Copy link
Author

hkroger commented Oct 24, 2016

This could be fixed also in this cassandra zipkin tracing module. It was partially already done, I think but this would need to be done as well in the ZipkinTracing class as well:

     public UUID newSession(Map<String,ByteBuffer> customPayload)
     {
-        return newSession(TraceType.QUERY);
+        return newSession(
+                TimeUUIDType.instance.compose(ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes())),
+                TraceType.QUERY,
+                customPayload);
     }

@hkroger
Copy link
Author

hkroger commented Oct 24, 2016

This change can be seen in with

git diff cassandra-3.9..cassandra-3.X src/java/org/apache/cassandra/tracing/Tracing.java

@hkroger
Copy link
Author

hkroger commented Oct 24, 2016

Actually it's not completely fixed in 3.10.SNAPSHOT. I created a JIRA ticket: https://issues.apache.org/jira/browse/CASSANDRA-12835

@michaelsembwever
Copy link
Member

CASSANDRA-12835 got resolved

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