qxo commented on issue #3314: ProtectiveShieldMatcher add feature for exclude 
some class with -Dskywalking_enhance_ignore_class_pattern, so we ignore some 
package
URL: https://github.com/apache/skywalking/pull/3314#issuecomment-524563334
 
 
   {code}
   
           final ByteBuddy byteBuddy = new ByteBuddy()
               .with(TypeValidation.of(Config.Agent.IS_OPEN_DEBUGGING_CLASS));
   
           Junction<TypeDescription> ignores = nameStartsWith("net.bytebuddy.");
   
   //change start 
           String ignoreList = 
System.getProperty("skywalking_ignore_class_prefixlist");
           if (ignoreList != null && (ignoreList = ignoreList.trim()).length() 
> 0) {
               logger.info("skywalking_ignore_class_prefixlist:{}",ignoreList);
               for (String p : ignoreList.split("[ ,;:]+")) {
                   ignores = ignores.or(nameStartsWith(p));
               }
           }
   //change end
   
           ignores = ignores.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());
           new AgentBuilder.Default(byteBuddy)
               .ignore(
                   ignores)
               .type(pluginFinder.buildMatch())
               .transform(new Transformer(pluginFinder))
               .with(new Listener())
               .installOn(instrumentation);
   {code}
   
   then -Dskywalking_ignore_class_prefixlist=com.jprofiler

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to