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

Capture raw query details #28

Open
jake-codes opened this issue Oct 23, 2019 · 7 comments
Open

Capture raw query details #28

jake-codes opened this issue Oct 23, 2019 · 7 comments

Comments

@jake-codes
Copy link

It would be an excellent addition to have the raw query details captured in the trace. An example of this can be found in Last Pickle's implementation.

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Oct 23, 2019 via email

@jake-codes
Copy link
Author

Both would be ideal but either would still be helpful.

@codefromthecrypt
Copy link
Member

@llinder @michaelsembwever I will presume you are ok with this heh. we can always do something different later also.

@jake-codes are you up to doing the pull request?

@llinder
Copy link
Member

llinder commented Oct 23, 2019

Makes sense to me and I think we actually do this internally for some services. My only point of caution is that, while it's neat to see the query, it probably doesn't justify the extra storage costs for high traffic sites. Unless we support some form of deduplication of tags, I don't know that there is a good solution for that besides adding some config to the instrumentation so folks can disable these extra tags.

@codefromthecrypt
Copy link
Member

@codefromthecrypt
Copy link
Member

we also tag the query client side if it is a bound statement

    if (statement instanceof BoundStatement) {
      customizer.tag(
          CassandraTraceKeys.CASSANDRA_QUERY,
          ((BoundStatement) statement).preparedStatement().getQueryString());
    }

@codefromthecrypt
Copy link
Member

I will be offline for a while, so if there's more follow-up I'd recommend whoever does to proceed with failing unit tests so that we aren't solving things already solved.

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

3 participants