fix bug #1912, the usage of ignore() problem (#1913)

* fix bug #1912

* fix bug #1912, recommit
This commit is contained in:
honganan 2018-11-17 19:16:51 +08:00 committed by 吴晟 Wu Sheng
parent e386a77296
commit 8a92e1b433
1 changed files with 11 additions and 7 deletions

View File

@ -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())