From b953a7ffd79a26b1e85b1ad0269d26b898aae140 Mon Sep 17 00:00:00 2001 From: Nikita Tkachenko Date: Fri, 17 May 2024 16:42:04 +0200 Subject: [PATCH 1/2] Do not transform Mockito-generated classes --- .../agent/tooling/bytebuddy/matcher/ignored_class_name.trie | 1 + 1 file changed, 1 insertion(+) diff --git a/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie b/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie index a3c242dac52..e5b4b5f10c0 100644 --- a/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie +++ b/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie @@ -355,6 +355,7 @@ 2 org.yaml.snakeyaml.* # saves ~0.5s skipping instrumentation of almost ~470 classes 2 scala.collection.* +1 org.mockito.codegen.* # -------- SPECIAL CASES -------- From 9f403ac6bf7bf0ba838c3cac5c59d955c0426f36 Mon Sep 17 00:00:00 2001 From: Nikita Tkachenko Date: Tue, 21 May 2024 09:37:26 +0200 Subject: [PATCH 2/2] Move Mockito ignore to system-level errors section --- .../agent/tooling/bytebuddy/matcher/ignored_class_name.trie | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie b/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie index e5b4b5f10c0..a999241b83e 100644 --- a/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie +++ b/dd-java-agent/agent-tooling/src/main/resources/datadog/trace/agent/tooling/bytebuddy/matcher/ignored_class_name.trie @@ -97,6 +97,7 @@ # USM needs it 0 sun.security.ssl.* 0 javax.net.ssl.SSLSocket +1 org.mockito.codegen.* # Prevent IllegalAccessError in OpenJDK 17.0.4 1 javax.management.* @@ -355,7 +356,6 @@ 2 org.yaml.snakeyaml.* # saves ~0.5s skipping instrumentation of almost ~470 classes 2 scala.collection.* -1 org.mockito.codegen.* # -------- SPECIAL CASES --------