From 156678a8bf78cbe8996ba39379da78f878ae43d1 Mon Sep 17 00:00:00 2001 From: mrproliu <741550557@qq.com> Date: Sat, 3 Jul 2021 16:56:05 +0800 Subject: [PATCH] Move ehcache-2.x plugin as optional (#7236) --- CHANGES.md | 1 + apm-sniffer/apm-sdk-plugin/pom.xml | 1 - .../ehcache-2.x-plugin/pom.xml | 2 +- .../apm/plugin/ehcache/v2/EhcacheCacheNameInterceptor.java | 0 .../apm/plugin/ehcache/v2/EhcacheConstructorInterceptor.java | 0 .../skywalking/apm/plugin/ehcache/v2/EhcacheEnhanceInfo.java | 0 .../apm/plugin/ehcache/v2/EhcacheLockInterceptor.java | 0 .../apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java | 0 .../apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java | 0 .../apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java | 0 .../plugin/ehcache/v2/EhcachePrivateConstructorInterceptor.java | 0 .../plugin/ehcache/v2/define/EhcachePluginInstrumentation.java | 0 .../ehcache-2.x-plugin/src/main/resources/skywalking-plugin.def | 0 .../apm/plugin/ehcache/v2/EhcacheInterceptorTest.java | 0 apm-sniffer/optional-plugins/pom.xml | 1 + docs/en/setup/service-agent/java-agent/README.md | 1 + test/plugin/scenarios/ehcache-2.x-scenario/configuration.yml | 2 ++ 17 files changed, 6 insertions(+), 2 deletions(-) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/pom.xml (96%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheCacheNameInterceptor.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheConstructorInterceptor.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheEnhanceInfo.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcachePrivateConstructorInterceptor.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/define/EhcachePluginInstrumentation.java (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/main/resources/skywalking-plugin.def (100%) rename apm-sniffer/{apm-sdk-plugin => optional-plugins}/ehcache-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheInterceptorTest.java (100%) diff --git a/CHANGES.md b/CHANGES.md index 7ce77b5a65..eef73ea63b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,6 +28,7 @@ Release Notes. * Fix some method exception error. * Fix async finish repeatedly in `spring-webflux-5.x-webclient` plugin. * Add agent plugin to support Sentinel. +* Move `ehcache-2.x` plugin as an optional plugin. #### OAP-Backend diff --git a/apm-sniffer/apm-sdk-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/pom.xml index 8eb9bdf21c..df1ec7bec7 100644 --- a/apm-sniffer/apm-sdk-plugin/pom.xml +++ b/apm-sniffer/apm-sdk-plugin/pom.xml @@ -87,7 +87,6 @@ solrj-7.x-plugin cassandra-java-driver-3.x-plugin light4j-plugins - ehcache-2.x-plugin pulsar-plugin netty-socketio-plugin armeria-0.84.x-plugin diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/pom.xml b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/pom.xml similarity index 96% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/pom.xml rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/pom.xml index 0e12d96274..a08d98a77e 100644 --- a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/pom.xml +++ b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/pom.xml @@ -19,8 +19,8 @@ - apm-sdk-plugin org.apache.skywalking + optional-plugins 8.7.0-SNAPSHOT 4.0.0 diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheCacheNameInterceptor.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheCacheNameInterceptor.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheCacheNameInterceptor.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheCacheNameInterceptor.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheConstructorInterceptor.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheConstructorInterceptor.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheConstructorInterceptor.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheConstructorInterceptor.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheEnhanceInfo.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheEnhanceInfo.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheEnhanceInfo.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheEnhanceInfo.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheLockInterceptor.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateAllInterceptor.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateElementInterceptor.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheOperateObjectInterceptor.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcachePrivateConstructorInterceptor.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcachePrivateConstructorInterceptor.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcachePrivateConstructorInterceptor.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcachePrivateConstructorInterceptor.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/define/EhcachePluginInstrumentation.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/define/EhcachePluginInstrumentation.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/define/EhcachePluginInstrumentation.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/ehcache/v2/define/EhcachePluginInstrumentation.java diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/resources/skywalking-plugin.def b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/resources/skywalking-plugin.def similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/main/resources/skywalking-plugin.def rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/main/resources/skywalking-plugin.def diff --git a/apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheInterceptorTest.java b/apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheInterceptorTest.java similarity index 100% rename from apm-sniffer/apm-sdk-plugin/ehcache-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheInterceptorTest.java rename to apm-sniffer/optional-plugins/ehcache-2.x-plugin/src/test/java/org/apache/skywalking/apm/plugin/ehcache/v2/EhcacheInterceptorTest.java diff --git a/apm-sniffer/optional-plugins/pom.xml b/apm-sniffer/optional-plugins/pom.xml index 1abe6081b3..8f49f27f36 100644 --- a/apm-sniffer/optional-plugins/pom.xml +++ b/apm-sniffer/optional-plugins/pom.xml @@ -51,6 +51,7 @@ quartz-scheduler-2.x-plugin mybatis-3.x-plugin sentinel-1.x-plugin + ehcache-2.x-plugin diff --git a/docs/en/setup/service-agent/java-agent/README.md b/docs/en/setup/service-agent/java-agent/README.md index 6f3db6b26c..c25337adfc 100755 --- a/docs/en/setup/service-agent/java-agent/README.md +++ b/docs/en/setup/service-agent/java-agent/README.md @@ -194,6 +194,7 @@ Now, we have the following known optional plugins. * Plugin of spring-webflux-5.x in the optional plugin folder. Please only activate this plugin when you use webflux alone as a web container. If you are using SpringMVC 5 or Spring Gateway, you don't need this plugin. * Plugin of mybatis-3.x in optional plugin folder. The reason of being optional plugin is, many local span are generated, which also spend more CPU, memory and network. * Plugin of sentinel-1.x in the optional plugin folder. The reason for being an optional plugin is, the sentinel plugin generates a large number of local spans, which have a potential performance impact. +* Plugin of ehcache-2.x in the optional plugin folder. The reason for being an optional plugin is, this plugin enhanced cache framework, generates large number of local spans, which have a potential performance impact. ## Bootstrap class plugins All bootstrap plugins are optional, due to unexpected risk. Bootstrap plugins are provided in `bootstrap-plugins` folder. diff --git a/test/plugin/scenarios/ehcache-2.x-scenario/configuration.yml b/test/plugin/scenarios/ehcache-2.x-scenario/configuration.yml index 050b37d467..c504a82a48 100644 --- a/test/plugin/scenarios/ehcache-2.x-scenario/configuration.yml +++ b/test/plugin/scenarios/ehcache-2.x-scenario/configuration.yml @@ -17,3 +17,5 @@ type: tomcat entryService: http://localhost:8080/ehcache-2.x-scenario/case/ehcache healthCheck: http://localhost:8080/ehcache-2.x-scenario/healthCheck +runningMode: with_optional +withPlugins: apm-ehcache-2.x-plugin-*.jar \ No newline at end of file -- GitLab