Skip to content

Commit c90d24e

Browse files
authored
Upgrade agent-test-tools and polish dubbo plugin (#387)
1 parent 91dfb70 commit c90d24e

6 files changed

Lines changed: 15 additions & 12 deletions

File tree

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ Release Notes.
1010
* Rename `JDBI` to `JDBC`
1111
* Support collecting dubbo thread pool metrics
1212
* Bump up byte-buddy to 1.12.19
13+
* Upgrade agent test tools
1314

1415
#### Documentation
1516

17+
* Update `Plugin-test.md`, support string operators `start with` and `end with`
18+
1619

1720

1821
All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/161?closed=1)

apm-sniffer/apm-sdk-plugin/dubbo-2.7.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/asf/dubbo/AbstractServerConstructorInterceptor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public void onConstruct(EnhancedInstance objInst, Object[] allArguments) throws
4646
return;
4747
}
4848
ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executor;
49-
// TODO String.format("DubboServerHandler-%s:%s", host, port) will be better
5049
String threadPoolName = String.format("DubboServerHandler-%s", port);
5150

5251
MeterFactory.gauge(METER_NAME, () -> (double) (threadPoolExecutor.getCorePoolSize()))

apm-sniffer/apm-sdk-plugin/dubbo-plugin/src/main/java/org/apache/skywalking/apm/plugin/dubbo/AbstractServerConstructorInterceptor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public void onConstruct(EnhancedInstance objInst, Object[] allArguments) throws
4646
return;
4747
}
4848
ThreadPoolExecutor threadPoolExecutor = (ThreadPoolExecutor) executor;
49-
// TODO String.format("DubboServerHandler-%s:%s", host, port) will be better
5049
String threadPoolName = String.format("DubboServerHandler-%s", port);
5150

5251
MeterFactory.gauge(METER_NAME, () -> (double) (threadPoolExecutor.getCorePoolSize()))

docs/en/setup/service-agent/java-agent/Plugin-test.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ The following files are required in every test case.
9191
File Name | Descriptions
9292
---|---
9393
`configuration.yml` | Declare the basic case information, including case name, entrance endpoints, mode, and dependencies.
94-
`expectedData.yaml` | Describe the expected segmentItems.
94+
`expectedData.yaml` | Describe the expected segmentItems, meterItems or logItems.
9595
`support-version.list` | List the target versions for this case.
9696
`startup.sh` |`JVM-container` only. This is not required when using `Tomcat-container`.
9797

@@ -202,12 +202,14 @@ as the version number, which will be changed in the test for each version.
202202

203203
**Operator for String**
204204

205-
| Operator | Description |
206-
|:------------|:--------------------------------------------------------------------------------------------------------------|
207-
| `not null` | Not null |
208-
| `not blank` | Not blank ,it's recommended for String type field as the default value maybe blank string, such as span tags |
209-
| `null` | Null or empty String |
210-
| `eq` | Equal(default) |
205+
| Operator | Description |
206+
|:-------------|:--------------------------------------------------------------------------------------------------------------|
207+
| `not null` | Not null |
208+
| `not blank` | Not blank ,it's recommended for String type field as the default value maybe blank string, such as span tags |
209+
| `null` | Null or empty String |
210+
| `eq` | Equal(default) |
211+
| `start with` | Tests if this string starts with the specified prefix. DO NOT use it with meterItem tags value |
212+
| `end with` | Tests if this string ends with the specified suffix. DO NOT use it with meterItem tags value |
211213

212214
**Expected Data Format Of The Segment**
213215
```yml

test/plugin/agent-test-tools/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<packaging>pom</packaging>
3636

3737
<properties>
38-
<agent-test-tools.version>7f20775e0631356c4823d9372b09d653db0e6540</agent-test-tools.version>
38+
<agent-test-tools.version>1c0bef2dd1d828e07889302bea980b24900b0db5</agent-test-tools.version>
3939
<agent-test-tools.workingDirectory>${project.basedir}/target/agent-test-tools</agent-test-tools.workingDirectory>
4040
<agent-test-tools.repos>https://github.com/apache/skywalking-agent-test-tool.git</agent-test-tools.repos>
4141
</properties>

tools/plugin/check-javaagent-plugin-list.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ WORK_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &&cd ../.. && pwd)"
2222
GENERNATE_PLUGINS_LIST=${SRC_DIR}/genernate-javaagent-plugin-list.txt
2323
MD_PLUGINS_LIST=${SRC_DIR}/md-javaagent-plugin-list.txt
2424

25-
function genernateJavaagentPluginList() {
25+
function generateJavaagentPluginList() {
2626
position_file="javaagent-position.txt"
2727
find ${WORK_DIR}/apm-sniffer -name "skywalking-plugin.def"|grep "src/main/resources" > ${position_file}
2828
cat ${position_file} | while read line
@@ -38,7 +38,7 @@ function getMdJavaagentPluginList() {
3838
cat ${md_javaagent_plugins_file}|grep -v "#" |awk -F " " '{ print $2}'|grep -E '^[a-z].*'|sort|uniq|awk NF >${MD_PLUGINS_LIST}
3939
}
4040

41-
genernateJavaagentPluginList
41+
generateJavaagentPluginList
4242
getMdJavaagentPluginList
4343
diff -w -bB -U0 ${MD_PLUGINS_LIST} ${GENERNATE_PLUGINS_LIST}
4444

0 commit comments

Comments
 (0)