From 0e132685e6900c4d985430e03e7b61905ee4a2ef Mon Sep 17 00:00:00 2001 From: Evan <31562192+EvanLjp@users.noreply.github.com> Date: Thu, 3 Sep 2020 23:20:36 +0800 Subject: [PATCH] fix doc on recently pr (#5432) --- apm-sniffer/config/agent.config | 4 ++-- .../annotations/AbstractSpringBeanInstrumentation.java | 6 +++--- .../plugin/spring/annotations/SpringAnnotationConfig.java | 2 +- docs/en/setup/service-agent/java-agent/README.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apm-sniffer/config/agent.config b/apm-sniffer/config/agent.config index ee51186599..d6fdf8557e 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 70ee287c1b..4bcea5855b 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 715e295372..9eeb47ebe4 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 cd0b5ec89f..ab29d19f29 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 -- GitLab