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

Support tracing in Cassandra itself #1

Open
yurishkuro opened this issue Jun 11, 2017 · 10 comments
Open

Support tracing in Cassandra itself #1

yurishkuro opened this issue Jun 11, 2017 · 10 comments
Assignees

Comments

@yurishkuro
Copy link

It would be nice if this module not only wrapped Cassandra calls in the client-side spans, but would also inject the opentracing span context into Cassandra requests so that tracing of the Cassandra backend was also possible, e.g. as was done in this blog post.

@malafeev
Copy link

malafeev commented Jun 12, 2017

As I understand from https://github.com/thelastpickle/cassandra-zipkin-tracing
It requires development of plugin (custom tracing class).
Each Cassandra node needs to be started with 2 jvm options:

JVM_OPTS = 
"-Dcassandra.custom_tracing_class=io.opentracing.contrib.cassandra.CustomTracing"
"-Dcassandra.custom_query_handler_class=org.apache.cassandra.cql3.CustomPayloadMirroringQueryHandler"

It will work only starting with Cassandra 3.4. Current is 3.10

@yurishkuro
Copy link
Author

That's my understanding as well. Hopefully the plugin can be purely OpenTracing, so that it would work with any tracer. It could use service loader.

@malafeev
Copy link

service loader requires adding file under "META-INF/service" with interface name (as filename) and implementation (in file content).
it sounds like user will need to build jar himself and before that prepare and put file under META-INF/service.
for me it looks not user friendly :)

@objectiser
Copy link

@malafeev The cassandra custom tracing class simply needs to use https://github.com/opentracing-contrib/java-tracerresolver - this uses service loader under the covers, so as long as the tracer provides the TracerResolver impl (and any relevant config) it will just work by adding the dependency to the cassandra server.

@malafeev
Copy link

looks like LightStep tracer doesn't provide TracerResolver. @bhs ?

@yurishkuro
Copy link
Author

Not sure about Lightstep. Jaeger does support tracer resolver

@bhs
Copy link
Contributor

bhs commented Jun 12, 2017

@malafeev, LightStep's tracer does not provide TracerResolver, but that is not intentional and easily remedied... we just haven't had a customer asking for it.

@malafeev
Copy link

malafeev commented Jun 13, 2017

I faced one issue: payload is sent using ByteBuffer.
But BINARY format support is not implemented properly in opentracing java api (I don't know size of byte buffer to allocate):
opentracing/opentracing-java#95

tracer.inject(span.context(), Builtin.BINARY, ByteBuffer.allocate(????????));

@bhs
Copy link
Contributor

bhs commented Jun 17, 2017

@malafeev just wanted to make sure you were aware of opentracing/opentracing-java#99 (which should be part of the 1.0 release, I'd argue).

@tedsuo
Copy link

tedsuo commented Jun 18, 2018

Latest BINARY proposal: opentracing/opentracing-java#276

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

5 participants