diff --git a/CHANGES.md b/CHANGES.md index 4c85ab32cc..eefe475bcb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,9 +10,12 @@ Release Notes. * Rename `JDBI` to `JDBC` * Support collecting dubbo thread pool metrics * Bump up byte-buddy to 1.12.19 +* Upgrade agent test tools #### Documentation +* Update `Plugin-test.md`, support string operators `start with` and `end with` + All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/161?closed=1) diff --git a/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/AbstractServerConstructorInterceptor.java b/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/AbstractServerConstructorInterceptor.java index 75b331e770..bd3357b010 100644 --- a/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/AbstractServerConstructorInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/AbstractServerConstructorInterceptor.java @@ -46,7 +46,6 @@ public void onConstruct(EnhancedInstance objInst, Object[] allArguments) throws return; } ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executor; - // TODO String.format("DubboServerHandler-%s:%s", host, port) will be better String threadPoolName = String.format("DubboServerHandler-%s", port); MeterFactory.gauge(METER_NAME, () -> (double) (threadPoolExecutor.getCorePoolSize())) diff --git a/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/AbstractServerConstructorInterceptor.java b/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/AbstractServerConstructorInterceptor.java index 99e53c66de..b260613445 100644 --- a/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/AbstractServerConstructorInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/AbstractServerConstructorInterceptor.java @@ -46,7 +46,6 @@ public void onConstruct(EnhancedInstance objInst, Object[] allArguments) throws return; } ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executor; - // TODO String.format("DubboServerHandler-%s:%s", host, port) will be better String threadPoolName = String.format("DubboServerHandler-%s", port); MeterFactory.gauge(METER_NAME, () -> (double) (threadPoolExecutor.getCorePoolSize())) diff --git a/docs/en/setup/service-agent/java-agent/Plugin-test.md b/docs/en/setup/service-agent/java-agent/Plugin-test.md index 00282bddc0..817bf33da0 100644 --- a/docs/en/setup/service-agent/java-agent/Plugin-test.md +++ b/docs/en/setup/service-agent/java-agent/Plugin-test.md @@ -91,7 +91,7 @@ The following files are required in every test case. File Name | Descriptions ---|--- `configuration.yml` | Declare the basic case information, including case name, entrance endpoints, mode, and dependencies. -`expectedData.yaml` | Describe the expected segmentItems. +`expectedData.yaml` | Describe the expected segmentItems, meterItems or logItems. `support-version.list` | List the target versions for this case. `startup.sh` |`JVM-container` only. This is not required when using `Tomcat-container`. @@ -202,12 +202,14 @@ as the version number, which will be changed in the test for each version. **Operator for String** -| Operator | Description | -|:------------|:--------------------------------------------------------------------------------------------------------------| -| `not null` | Not null | -| `not blank` | Not blank ,it's recommended for String type field as the default value maybe blank string, such as span tags | -| `null` | Null or empty String | -| `eq` | Equal(default) | +| Operator | Description | +|:-------------|:--------------------------------------------------------------------------------------------------------------| +| `not null` | Not null | +| `not blank` | Not blank ,it's recommended for String type field as the default value maybe blank string, such as span tags | +| `null` | Null or empty String | +| `eq` | Equal(default) | +| `start with` | Tests if this string starts with the specified prefix. DO NOT use it with meterItem tags value | +| `end with` | Tests if this string ends with the specified suffix. DO NOT use it with meterItem tags value | **Expected Data Format Of The Segment** ```yml diff --git a/test/plugin/agent-test-tools/pom.xml b/test/plugin/agent-test-tools/pom.xml index c817cd03e8..7238da230c 100644 --- a/test/plugin/agent-test-tools/pom.xml +++ b/test/plugin/agent-test-tools/pom.xml @@ -35,7 +35,7 @@ pom - 7f20775e0631356c4823d9372b09d653db0e6540 + 1c0bef2dd1d828e07889302bea980b24900b0db5 ${project.basedir}/target/agent-test-tools https://github.com/apache/skywalking-agent-test-tool.git diff --git a/tools/plugin/check-javaagent-plugin-list.sh b/tools/plugin/check-javaagent-plugin-list.sh index 193e739461..46ebda6d0a 100755 --- a/tools/plugin/check-javaagent-plugin-list.sh +++ b/tools/plugin/check-javaagent-plugin-list.sh @@ -22,7 +22,7 @@ WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &&cd ../.. && pwd)" GENERNATE_PLUGINS_LIST=${SRC_DIR}/genernate-javaagent-plugin-list.txt MD_PLUGINS_LIST=${SRC_DIR}/md-javaagent-plugin-list.txt -function genernateJavaagentPluginList() { +function generateJavaagentPluginList() { position_file="javaagent-position.txt" find ${WORK_DIR}/apm-sniffer -name "skywalking-plugin.def"|grep "src/main/resources" > ${position_file} cat ${position_file} | while read line @@ -38,7 +38,7 @@ function getMdJavaagentPluginList() { cat ${md_javaagent_plugins_file}|grep -v "#" |awk -F " " '{ print $2}'|grep -E '^[a-z].*'|sort|uniq|awk NF >${MD_PLUGINS_LIST} } -genernateJavaagentPluginList +generateJavaagentPluginList getMdJavaagentPluginList diff -w -bB -U0 ${MD_PLUGINS_LIST} ${GENERNATE_PLUGINS_LIST}