diff --git a/apm-sniffer/config/agent.config b/apm-sniffer/config/agent.config index ee5118659904b74f8ed7f83a426ec62f489b65c6..d6fdf8557e616ac26aafea375c35e554542626ba 100644 --- a/apm-sniffer/config/agent.config +++ b/apm-sniffer/config/agent.config @@ -92,7 +92,7 @@ logging.level=${SW_LOGGING_LEVEL:INFO} # plugin.kafka.bootstrap_servers=${SW_KAFKA_BOOTSTRAP_SERVERS:localhost:9092} # Exclude activated plugins -# plugin.exclude_plugins=${SW_EXCLUDE_PLUGINS:""} +# plugin.exclude_plugins=${SW_EXCLUDE_PLUGINS:} # Match spring bean with regex expression for classname -# plugin.springannotation.classname_match_regex_expression=${SW_SPRINGANNOTATION_CLASSNAME_MATCH_REGEX_EXPRESSION:""} +# plugin.springannotation.classname_match_regex=${SW_SPRINGANNOTATION_CLASSNAME_MATCH_REGEX:} diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/AbstractSpringBeanInstrumentation.java b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/AbstractSpringBeanInstrumentation.java index 70ee287c1b612d9f85bb12b2e5d3a7841f305ee5..4bcea5855bba27e9e996e5424f86608cd406470e 100644 --- a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/AbstractSpringBeanInstrumentation.java +++ b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/AbstractSpringBeanInstrumentation.java @@ -34,7 +34,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named; import static net.bytebuddy.matcher.ElementMatchers.not; import static org.apache.skywalking.apm.agent.core.plugin.match.ClassAnnotationMatch.byClassAnnotationMatch; import static org.apache.skywalking.apm.agent.core.plugin.match.RegexMatch.byRegexMatch; -import static org.apache.skywalking.apm.plugin.spring.annotations.SpringAnnotationConfig.Plugin.SpringAnnotation.CLASSNAME_MATCH_REGEX_EXPRESSION; +import static org.apache.skywalking.apm.plugin.spring.annotations.SpringAnnotationConfig.Plugin.SpringAnnotation.CLASSNAME_MATCH_REGEX; public abstract class AbstractSpringBeanInstrumentation extends ClassInstanceMethodsEnhancePluginDefine { private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.spring.annotations.SpringAnnotationInterceptor"; @@ -72,11 +72,11 @@ public abstract class AbstractSpringBeanInstrumentation extends ClassInstanceMet @Override protected ClassMatch enhanceClass() { - if (StringUtil.isEmpty(CLASSNAME_MATCH_REGEX_EXPRESSION)) { + if (StringUtil.isEmpty(CLASSNAME_MATCH_REGEX)) { return byClassAnnotationMatch(getEnhanceAnnotation()); } else { return LogicalMatchOperation.and( - byRegexMatch(CLASSNAME_MATCH_REGEX_EXPRESSION.split(",")), + byRegexMatch(CLASSNAME_MATCH_REGEX.split(",")), byClassAnnotationMatch(getEnhanceAnnotation()) ); } diff --git a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationConfig.java b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationConfig.java index 715e295372dd1553fe7cdaee5557b892020ac148..9eeb47ebe4c10962a73f22ed69a17a93121c4d95 100644 --- a/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationConfig.java +++ b/apm-sniffer/optional-plugins/optional-spring-plugins/spring-annotation-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/annotations/SpringAnnotationConfig.java @@ -28,7 +28,7 @@ public class SpringAnnotationConfig { /** * regex expression to match spring bean classname */ - public static String CLASSNAME_MATCH_REGEX_EXPRESSION = ""; + public static String CLASSNAME_MATCH_REGEX = ""; } } } \ No newline at end of file diff --git a/docs/en/setup/service-agent/java-agent/README.md b/docs/en/setup/service-agent/java-agent/README.md index cd0b5ec89f50f61e25d64cc07184f94fdc1ea4b9..ab29d19f2908865eaa1e919bf857e25adff49e98 100755 --- a/docs/en/setup/service-agent/java-agent/README.md +++ b/docs/en/setup/service-agent/java-agent/README.md @@ -153,7 +153,7 @@ property key | Description | Default | `plugin.kafka.topic_segment` | Specify which Kafka topic name for traces data to report to. | `skywalking_segments` | `plugin.kafka.topic_profilings` | Specify which Kafka topic name for Thread Profiling snapshot to report to. | `skywalking_profilings` | `plugin.kafka.topic_management` | Specify which Kafka topic name for the register or heartbeat data of Service Instance to report to. | `skywalking_managements` | -`plugin.springannotation.classname_match_regex_expression` | Match spring beans with regex expression for the class name. Multiple expressions could be separated by a comma. This only works when `Spring annotation plugin` has been activated. | `All the spring beans tagged with @Bean,@Service,@Dao, or @Repository.` | +`plugin.springannotation.classname_match_regex` | Match spring beans with regular expression for the class name. Multiple expressions could be separated by a comma. This only works when `Spring annotation plugin` has been activated. | `All the spring beans tagged with @Bean,@Service,@Dao, or @Repository.` | ## Optional Plugins