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

Cassandra-Datastax 3 instrumentation #70

Merged
merged 10 commits into from
Oct 11, 2023
Merged

Conversation

IshikaDawda
Copy link
Contributor

Instrumentation Cassandra Datastax 3

@IshikaDawda IshikaDawda self-assigned this Jun 26, 2023

@Weave(type = MatchType.ExactClass, originalName = "com.datastax.driver.core.SessionManager")
abstract class SessionManager_Instrumentation {
final Cluster cluster = Weaver.callOriginal();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use getter instead of class member

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit

private final Object[] values = Weaver.callOriginal();
private final Map<String, Object> namedValues = Weaver.callOriginal();
@WeaveAllConstructors
public SimpleStatement_Instrumentation() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please weave all constructors separately and do not use weaving of member variables

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit

SQLOperation cqlOperation = new SQLOperation(this.getClass().getName(), CassandraUtils.METHOD_EXECUTE_ASYNC);
cqlOperation.setQuery(query);
cqlOperation.setCaseType(VulnerabilityCaseType.NOSQL_DB_COMMAND);
cqlOperation.setDbName(CassandraUtils.EVENT_CATEGORY);
Copy link
Contributor

Choose a reason for hiding this comment

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

Discuss with SE team what are they expecting in DB name

@lovesh-ap lovesh-ap self-requested a review October 11, 2023 05:09
@lovesh-ap lovesh-ap merged commit 7ecca36 into develop Oct 11, 2023
6 checks passed
@lovesh-ap lovesh-ap deleted the feature/cassandra-inst/3 branch October 11, 2023 05:44
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.

3 participants