-
Notifications
You must be signed in to change notification settings - Fork 468
[cassandra] Fix batched query leak #714
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
Conversation
brettlangdon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you tested this with agent obfuscation as well?
|
Yes this was tested with the agent obfuscation. However your comment made me check again and I caught an issue where including the query as a tag for a cassandra span will not result in the query being overwritten with the obfuscated query. I've updated the PR description with the before and after of a trace. One more thing to consider is if there are issues with using multiple combined queries as a resource. |
|
Also, have you tested with running multiple queries at once in batch? Either 2-3 of the same query or 2-3 of different queries. do we handle obfuscation properly there? Other than that and the one question I had re: assertion, this appears to be mostly good to go. |
|
Obfuscation seems to work with multiple queries, including different types of queries. |
|
One last small question, but otherwise this is good to go. |
|
There is a merge conflict here now as well. |
| # reset query if a string is available | ||
| resource = getattr(query, "query_string", query) | ||
| elif t == 'BatchStatement': | ||
| resource = 'BatchStatement' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad merge?
brettlangdon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This reverts commit cb245cd.
The cassandra integration does not adhere spans created for batch statements to the specification required by the agent to obfuscate the query.
This PR changes the logic so that query is set as the resource of the span. Since the span type is already set to
'cassandra'the query can now be properly obfuscated by the agent.Before:

After:
