Ignore majority of cassandra classes
MODIFY
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/bytebuddy/matcher/AdditionalLibraryIgnoresMatcher.java
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/bytebuddy/matcher/AdditionalLibraryIgnoresMatcher.java
@@ -104,6 +104,13 @@ public class AdditionalLibraryIgnoresMatcher<T extends TypeDescription>
return true;
}
+ if (name.startsWith("com.datastax.driver.")) {
+ if (name.startsWith("com.datastax.driver.core.Cluster$")) {
+ return false;
+ }
+ return true;
+ }
+
// kotlin, note we do not ignore kotlinx because we instrument coroutins code
if (name.startsWith("kotlin.")) {
return true;

MODIFY
dd-java-agent/instrumentation/datastax-cassandra-3/src/main/java/datadog/trace/instrumentation/datastax/cassandra/CassandraClientInstrumentation.java
dd-java-agent/instrumentation/datastax-cassandra-3/src/main/java/datadog/trace/instrumentation/datastax/cassandra/CassandraClientInstrumentation.java
@@ -24,6 +24,8 @@ public class CassandraClientInstrumentation extends Instrumenter.Default {
@Override
public ElementMatcher<TypeDescription> typeMatcher() {
+ // Note: Cassandra has a large driver and we instrument single class in it.
+ // The rest is ignored in AdditionalLibraryIgnoresMatcher
return named("com.datastax.driver.core.Cluster$Manager");
}

Ignore majority of cassandra classes