Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/plugins-test.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ jobs:
- { name: 'spring-4.1.x-scenario', title: 'Spring 4.1.x-4.2.x (20)' }
- { name: 'spring-4.3.x-scenario', title: 'Spring 4.3.x-5.2.x (54)' }
- { name: 'spring-async-scenario', title: 'Spring Async 4.3.x-5.1.x (35)' }
- { name: 'vertx-eventbus-3.x-scenario', title: 'Vert.x EventBus 3.2.x-3.7.x (19)' }
- { name: 'vertx-web-3.x-scenario', title: 'Vert.x Web 3.0.x-3.7.x (21)' }
steps:
- uses: actions/checkout@v2
- name: checkout submodules
Expand Down
21 changes: 21 additions & 0 deletions test/plugin/scenarios/vertx-eventbus-3.x-scenario/bin/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

home="$(cd "$(dirname $0)"; pwd)"

java -jar ${agent_opts} ${home}/../libs/vertx-eventbus-3.x-scenario.jar &
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
segmentItems:
- serviceName: vertx-eventbus-3.x-scenario
segmentSize: 7
segments:
- segmentId: not null
spans:
- operationName: local-message-receiver
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: RPCFramework
startTime: nq 0
endTime: nq 0
componentId: 59
isError: false
spanType: Local
peer: ''
skipAnalysis: false
refs:
- {parentEndpoint: local-message-receiver, networkAddress: '', refType: CrossThread,
parentSpanId: 0, parentTraceSegmentId: not null,
parentServiceInstance: not null, parentService: vertx-eventbus-3.x-scenario,
traceId: not null}
- segmentId: not null
spans:
- {operationName: local-message-receiver, operationId: 0, parentSpanId: -1, spanId: 0,
spanLayer: RPCFramework, startTime: nq 0, endTime: nq 0, componentId: 59,
isError: false, spanType: Local, peer: '', skipAnalysis: false}
- segmentId: not null
spans:
- operationName: /vertx-eventbus-3-scenario/case/executeTest
operationId: 0
parentSpanId: 0
spanId: 1
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 59
isError: false
spanType: Exit
peer: localhost:8080
skipAnalysis: false
tags:
- {key: http.method, value: GET}
- {key: url, value: /vertx-eventbus-3-scenario/case/executeTest}
- operationName: /vertx-eventbus-3-scenario/case/eventbus-case
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 59
isError: false
spanType: Entry
peer: ''
skipAnalysis: false
tags:
- {key: http.method, value: GET}
- {key: url, value: /vertx-eventbus-3-scenario/case/eventbus-case}
- segmentId: not null
spans:
- operationName: '#/vertx-eventbus-3-scenario/case/executeTest'
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 59
isError: false
spanType: Local
peer: ''
skipAnalysis: false
refs:
- {parentEndpoint: /vertx-eventbus-3-scenario/case/eventbus-case, networkAddress: '',
refType: CrossThread, parentSpanId: 1, parentTraceSegmentId: not null,
parentServiceInstance: not null, parentService: vertx-eventbus-3.x-scenario,
traceId: not null}
- segmentId: not null
spans:
- operationName: cluster-message-receiver
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: RPCFramework
startTime: nq 0
endTime: nq 0
componentId: 59
isError: false
spanType: Entry
peer: ''
skipAnalysis: false
refs:
- {parentEndpoint: cluster-message-receiver, networkAddress: not null,
refType: CrossProcess, parentSpanId: 0, parentTraceSegmentId: not null,
parentServiceInstance: not null, parentService: vertx-eventbus-3.x-scenario,
traceId: not null}
- segmentId: not null
spans:
- {operationName: cluster-message-receiver, operationId: 0, parentSpanId: -1,
spanId: 0, spanLayer: RPCFramework, startTime: nq 0, endTime: nq 0,
componentId: 59, isError: false, spanType: Exit, peer: not null, skipAnalysis: false}
- segmentId: not null
spans:
- operationName: /vertx-eventbus-3-scenario/case/executeTest
operationId: 0
parentSpanId: -1
spanId: 0
spanLayer: Http
startTime: nq 0
endTime: nq 0
componentId: 59
isError: false
spanType: Entry
peer: ''
skipAnalysis: false
tags:
- {key: http.method, value: GET}
- {key: url, value: /vertx-eventbus-3-scenario/case/executeTest}
refs:
- {parentEndpoint: /vertx-eventbus-3-scenario/case/eventbus-case, networkAddress: 'localhost:8080',
refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null,
parentServiceInstance: not null, parentService: vertx-eventbus-3.x-scenario,
traceId: not null}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

type: jvm
entryService: http://localhost:8080/vertx-eventbus-3-scenario/case/eventbus-case
healthCheck: http://localhost:8080/vertx-eventbus-3-scenario/case/healthCheck
startScript: ./bin/startup.sh
99 changes: 99 additions & 0 deletions test/plugin/scenarios/vertx-eventbus-3.x-scenario/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<groupId>org.apache.skywalking.apm.testcase</groupId>
<artifactId>vertx-eventbus-3.x-scenario</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>

<modelVersion>4.0.0</modelVersion>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<compiler.version>1.8</compiler.version>
<test.framework.version>3.7.0</test.framework.version>
</properties>

<name>skywalking-vertx-eventbus-3.x-scenario</name>

<dependencies>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<version>${test.framework.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-web</artifactId>
<version>${test.framework.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-hazelcast</artifactId>
<version>${test.framework.version}</version>
</dependency>
</dependencies>

<build>
<finalName>vertx-eventbus-3.x-scenario</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${compiler.version}</source>
<target>${compiler.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assemble</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>./target/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You under the Apache License, Version 2.0
~ (the "License"); you may not use this file except in compliance with
~ the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
-->
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<formats>
<format>zip</format>
</formats>

<fileSets>
<fileSet>
<directory>./bin</directory>
<fileMode>0775</fileMode>
</fileSet>
</fileSets>

<files>
<file>
<source>${project.build.directory}/vertx-eventbus-3.x-scenario.jar</source>
<outputDirectory>./libs</outputDirectory>
<fileMode>0775</fileMode>
</file>
</files>
</assembly>
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.testcase.vertxeventbus;

import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.spi.cluster.ClusterManager;
import io.vertx.spi.cluster.hazelcast.HazelcastClusterManager;

import org.apache.skywalking.apm.testcase.vertxeventbus.controller.ClusterReceiver;
import org.apache.skywalking.apm.testcase.vertxeventbus.controller.VertxEventbusController;

public class Application {

public static void main(String[] args) {
System.setProperty("vertx.disableFileCPResolving", "true");
ClusterManager mgr = new HazelcastClusterManager();
VertxOptions options = new VertxOptions().setClusterManager(mgr);
Vertx.clusteredVertx(options, cluster -> {
if (cluster.succeeded()) {
cluster.result().deployVerticle(new ClusterReceiver(), deploy -> {
if (deploy.succeeded()) {
ClusterManager mgr2 = new HazelcastClusterManager();
VertxOptions options2 = new VertxOptions().setClusterManager(mgr2);
Vertx.clusteredVertx(options2, cluster2 -> {
if (cluster2.succeeded()) {
cluster2.result().deployVerticle(new VertxEventbusController());
} else {
cluster2.cause().printStackTrace();
System.exit(-1);
}
});
} else {
deploy.cause().printStackTrace();
System.exit(-1);
}
});
} else {
cluster.cause().printStackTrace();
System.exit(-1);
}
});
}
}
Loading