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

initial cassandra instrumentation #205

Closed

Conversation

beniwohli
Copy link
Contributor

@beniwohli beniwohli commented Apr 26, 2018

This instruments Cluster.connect and Session.execute.
The test matrix only includes version 3.4 and 3.14+, as earlier versions of the client don't work on Python 2.7.11+.

Open questions:

  • our SQL parser (used to get a significant span name from the query) seems to cope quite well with CQL. I'm not a huge Cassandra expert though, so it would be great if somebody with more expertise could contribute some interesting test cases (the more it doesn't look like SQL, the better).
  • there's also a commercial variant of Cassandra, called Datastax Enterprise. The parts of the driver that is interesting to us seems to be more or less identical to the open source cassandra driver, so theoretically we could just instrument it as well (by instrumenting the same methods in the dse namespace). However, we should probably test this. There is a docker image for DSE available, so we might be able to use that, if we deem it necessary to support DSE.

@jalvz
Copy link
Contributor

jalvz commented Apr 30, 2018

it looks great!

did you try cassandra.concurrent?
i think instrumenting execute_async could be nice

re. cql is smaller than sql, i can't think of more interesting cases than you have. is great you have a test for CREATE KEYSPACE, maybe one for CREATE COLUMNFAMILY would make sense too?

@beniwohli
Copy link
Contributor Author

@jalvz just added a test for COLUMNFAMILY

As for instrumenting execute_async, I had a look at it, but there's not really a way to do that properly right now, as we don't support async in general (e.g. we can't connect the span with the future that is returned by execute_async, and there is no way to know which transaction to attach it to once it's done).

Once we get around to properly support async frameworks, we should have another look.

This instruments `Cluster.connect` and `Session.execute`.
The test matrix only includes version 3.4 and 3.14+, as earlier versions of the client don't work on Python 2.7.10+.
@@ -119,3 +127,5 @@ volumes:
driver: local
pyesdata2:
driver: local
cassandradata3:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beniwohli I just noticed that all the other volumes is prefixed with py. I don't know exactly why, but my best guess is so it doesn't interferer with the other agent tests. If that's the case, this should probably be prefixed as well right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Feel free to open a PR :)

@beniwohli beniwohli deleted the cassandra-instrumentation branch July 7, 2018 08:37
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

Successfully merging this pull request may close these issues.

None yet

4 participants