Ignore more spring
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
@@ -45,42 +45,112 @@ public class AdditionalLibraryIgnoresMatcher<T extends TypeDescription>
return true;
}
+ if (name.startsWith("org.springframework.")) {
if (name.startsWith("org.springframework.aop.")
- || name.startsWith("org.springframework.beans.factory.annotation.")
- || name.startsWith("org.springframework.beans.factory.config.")
- || name.startsWith("org.springframework.beans.factory.parsing.")
- || name.startsWith("org.springframework.beans.factory.xml.")
- || name.startsWith("org.springframework.beans.propertyeditors.")
- || name.startsWith("org.springframework.boot.autoconfigure.cache.")
- || name.startsWith("org.springframework.boot.autoconfigure.condition.")
- || name.startsWith("org.springframework.boot.autoconfigure.http.")
- || name.startsWith("org.springframework.boot.autoconfigure.jackson.")
- || name.startsWith("org.springframework.boot.autoconfigure.web.")
- || name.startsWith("org.springframework.boot.context.")
- || name.startsWith("org.springframework.boot.convert.")
- || name.startsWith("org.springframework.boot.diagnostics.")
- || name.startsWith("org.springframework.boot.web.server.")
- || name.startsWith("org.springframework.boot.web.servlet.")
- || name.startsWith("org.springframework.context.annotation.")
- || name.startsWith("org.springframework.context.event.")
- || name.startsWith("org.springframework.context.expression.")
- || name.startsWith("org.springframework.core.annotation.")
- || name.startsWith("org.springframework.core.convert.")
- || name.startsWith("org.springframework.core.env.")
- || name.startsWith("org.springframework.core.io.")
- || name.startsWith("org.springframework.core.type.")
+ || name.startsWith("org.springframework.asm.")
+ || name.startsWith("org.springframework.cache.")
+ || name.startsWith("org.springframework.dao.")
+ || name.startsWith("org.springframework.ejb.")
|| name.startsWith("org.springframework.expression.")
|| name.startsWith("org.springframework.format.")
+ || name.startsWith("org.springframework.instrument.")
+ || name.startsWith("org.springframework.jca.")
+ || name.startsWith("org.springframework.jdbc.")
+ || name.startsWith("org.springframework.jms.")
+ || name.startsWith("org.springframework.jmx.")
+ || name.startsWith("org.springframework.jndi.")
+ || name.startsWith("org.springframework.lang.")
+ || name.startsWith("org.springframework.messaging.")
+ || name.startsWith("org.springframework.objenesis.")
+ || name.startsWith("org.springframework.orm.")
+ || name.startsWith("org.springframework.remoting.")
+ || name.startsWith("org.springframework.scheduling.annotation")
+ || name.startsWith("org.springframework.scripting.")
+ || name.startsWith("org.springframework.stereotype.")
+ || name.startsWith("org.springframework.transaction.")
|| name.startsWith("org.springframework.ui.")
- || name.startsWith("org.springframework.validation.")
- || name.startsWith("org.springframework.web.context.")
- || name.startsWith("org.springframework.web.filter.")
- || name.startsWith("org.springframework.web.method.")
- || name.startsWith("org.springframework.web.multipart.")
- || name.startsWith("org.springframework.web.util.")) {
+ || name.startsWith("org.springframework.util.")
+ || name.startsWith("org.springframework.validation.")) {
return true;
}
+ if (name.startsWith("org.springframework.data.")) {
+ if (name.equals(
+ "org.springframework.data.repository.core.support.RepositoryFactorySupport")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.amqp.")) {
+ if (name.startsWith("org.springframework.amqp.rabbit.connection.")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.beans.")) {
+ if (name.equals("org.springframework.beans.factory.support.DisposableBeanAdapter")
+ || name.startsWith(
+ "org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader$")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.boot.")) {
+ // More runnables to deal with
+ if (name.startsWith("org.springframework.boot.autoconfigure.BackgroundPreinitializer$")
+ || name.startsWith("org.springframework.boot.web.embedded.netty.NettyWebServer$")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.cglib.")) {
+ // This class contains nested Callable instance that we'd happily not touch, but
+ // unfortunately our field injection code is not flexible enough to realize that, so instead
+ // we instrument this Callable to make tests happy.
+ if (name.startsWith("org.springframework.cglib.core.internal.LoadingCache$")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.context.")) {
+ // More runnables to deal with
+ if (name.startsWith("org.springframework.context.support.AbstractApplicationContext$")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.core.")) {
+ if (name.startsWith("org.springframework.core.task.")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.http.")) {
+ // There are some Mono implementation that get instrumented
+ if (name.startsWith("org.springframework.http.server.reactive.")) {
+ return false;
+ }
+ return true;
+ }
+
+ if (name.startsWith("org.springframework.web.")) {
+ if (name.startsWith("org.springframework.web.servlet.")
+ || name.startsWith("org.springframework.web.reactive.")) {
+ return false;
+ }
+ return true;
+ }
+
+ return false;
+ }
+
// xml-apis, xerces, xalan
if (name.startsWith("javax.xml.")
|| name.startsWith("org.apache.bcel.")
@@ -169,31 +239,6 @@ public class AdditionalLibraryIgnoresMatcher<T extends TypeDescription>
return true;
}
- // Dynamic proxy classes we should not touch
- if (name.startsWith("org.springframework.core.$Proxy")) {
- return true;
- }
-
- if (name.startsWith("org.springframework.cglib.")) {
- // This class contains nested Callable instance that we'd happily not touch, but unfortunately
- // our field injection code is not flexible enough to realize that, so instead
- // we instrument this Callable to make tests happy.
- if (name.startsWith("org.springframework.cglib.core.internal.LoadingCache$")) {
- return false;
- }
-
- return true;
- }
-
- if (name.startsWith("org.springframework.http.")) {
- // There are some Mono implementation that get instrumented
- if (name.startsWith("org.springframework.http.server.reactive.")) {
- return false;
- }
-
- return true;
- }
-
return false;
}

Ignore more spring