You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2018/11/17 11:16:58 UTC

[incubator-skywalking] branch master updated: fix bug #1912, the usage of ignore() problem (#1913)

This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a92e1b  fix bug #1912, the usage of ignore() problem (#1913)
8a92e1b is described below

commit 8a92e1b4334f0e497a745c7f67c152139a0a898e
Author: honganan <97...@qq.com>
AuthorDate: Sat Nov 17 19:16:51 2018 +0800

    fix bug #1912, the usage of ignore() problem (#1913)
    
    * fix bug #1912
    
    * fix bug #1912, recommit
---
 .../apache/skywalking/apm/agent/SkyWalkingAgent.java   | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/apm-sniffer/apm-agent/src/main/java/org/apache/skywalking/apm/agent/SkyWalkingAgent.java b/apm-sniffer/apm-agent/src/main/java/org/apache/skywalking/apm/agent/SkyWalkingAgent.java
index 6dbc307..395d129 100644
--- a/apm-sniffer/apm-agent/src/main/java/org/apache/skywalking/apm/agent/SkyWalkingAgent.java
+++ b/apm-sniffer/apm-agent/src/main/java/org/apache/skywalking/apm/agent/SkyWalkingAgent.java
@@ -25,6 +25,7 @@ import net.bytebuddy.description.type.TypeDescription;
 import net.bytebuddy.dynamic.DynamicType;
 import net.bytebuddy.dynamic.scaffold.TypeValidation;
 import net.bytebuddy.matcher.ElementMatcher;
+import net.bytebuddy.matcher.ElementMatchers;
 import net.bytebuddy.utility.JavaModule;
 import org.apache.skywalking.apm.agent.core.boot.ServiceManager;
 import org.apache.skywalking.apm.agent.core.conf.Config;
@@ -69,13 +70,16 @@ public class SkyWalkingAgent {
             .with(TypeValidation.of(Config.Agent.IS_OPEN_DEBUGGING_CLASS));
 
         new AgentBuilder.Default(byteBuddy)
-            .ignore(nameStartsWith("net.bytebuddy."))
-            .ignore(nameStartsWith("org.slf4j."))
-            .ignore(nameStartsWith("org.apache.logging."))
-            .ignore(nameStartsWith("org.groovy."))
-            .ignore(nameContains("javassist"))
-            .ignore(nameContains(".asm."))
-            .ignore(allSkyWalkingAgentExcludeToolkit())
+            .ignore(
+                nameStartsWith("net.bytebuddy.")
+                .or(nameStartsWith("org.slf4j."))
+                .or(nameStartsWith("org.apache.logging."))
+                .or(nameStartsWith("org.groovy."))
+                .or(nameContains("javassist"))
+                .or(nameContains(".asm."))
+                .or(nameStartsWith("sun.reflect"))
+                .or(allSkyWalkingAgentExcludeToolkit())
+                .or(ElementMatchers.<TypeDescription>isSynthetic()))
             .type(pluginFinder.buildMatch())
             .transform(new Transformer(pluginFinder))
             .with(new Listener())