opentracing-contrib / java-cassandra-driver Goto Github PK
View Code? Open in Web Editor NEWOpenTracing instrumentation for Cassandra Driver
License: Apache License 2.0
OpenTracing instrumentation for Cassandra Driver
License: Apache License 2.0
My team is currently exploring the use of this driver at HomeAway, and we were hoping to get more options for the operation name of the span. Currently it's hardcoded to "execute" at this line.
TracingCqlSession.java is overriding (adding the tracing feature):
ResultSet execute(...)
CompletionStage<AsyncResultSet> executeAsync(...)
However executeReactive(...)
is not present in this class, so this means that tracing is not enabled when using cassandra reactive API. It would be nice to have this feature in this project.
We want to extract IP address from the ipv4 tag. TracingSession is writing the int representation of the ipv4 address which makes the tag representation hard to understand.
We want to add custom tags to OpenTracing Span object by overriding/augmenting methods in TracingSession.java
. This can be accomplished by making buildSpan()
, finishSpan()
, and errorLogs()
methods public so that subclasses can override them and provide custom implemtation.
When using cassandra-driver-mapping
OpenTracing instrumentation doesn't work well. E.g. some spans are missing.
I think I have a fix for that, will prepare the PR soon after internal testing yields positive results.
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.
The specification calls for peer.ipv4 to be a string:
peer.ipv4 string Remote IPv4 address as a .-separated tuple. E.g., "127.0.0.1"
https://github.com/opentracing/specification/blob/master/semantic_conventions.md
TracingSession is writing the int representation of the ipv4 address.
https://github.com/opentracing-contrib/java-cassandra-driver/blob/master/src/main/java/io/opentracing/contrib/cassandra/TracingSession.java#L306
This makes the tag representation hard to understand:
{db.instance=test, component=java-cassandra, db.type=cassandra, span.kind=client, db.statement=INSERT INTO testtable (key,value) VALUES (?,?), peer.hostname=localhost, peer.port=9044, peer.ipv4=2130706433}
Instead of
{db.instance=test, component=java-cassandra, db.type=cassandra, span.kind=client, db.statement=INSERT INTO testtable (key,value) VALUES (?,?), peer.hostname=localhost, peer.port=9044, peer.ipv4=127.0.0.1}
Hi,
In my case, I have some query like this:
select ..., ..., batch_id, ..., ... from ...
And the result is Cassandra.BATCH and not Cassandra.SELECT as expected.
This bug comes from QueryMethodTableSpanName.getManipulationMethod() which search the manipulation method in the whole query.
To fix that, may be cut the query at the first space to only scan the first word ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.