diff --git a/.github/workflows/plugins-test.3.yaml b/.github/workflows/plugins-test.3.yaml index 96f0458336012d6d4e1c41cdf5f3bea7f6d3a6e7..42069a540753c2045b75222fb73cb68e9fa14bfb 100644 --- a/.github/workflows/plugins-test.3.yaml +++ b/.github/workflows/plugins-test.3.yaml @@ -41,8 +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)' } + - { name: 'vertx-eventbus-3.x-scenario', title: 'Vert.x EventBus 3.2.0-3.9.0 (27)' } + - { name: 'vertx-web-3.x-scenario', title: 'Vert.x Web 3.0.0-3.9.0 (29)' } steps: - uses: actions/checkout@v2 with: diff --git a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java index a572ed22796857c9e5b6d32af687bcb48ce0bec2..6e2e3ae2a4b3cfcbb76dc3384bb362d8619f6048 100644 --- a/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java +++ b/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/AbstractTracingSpan.java @@ -311,7 +311,7 @@ public abstract class AbstractTracingSpan implements AbstractSpan { throw new RuntimeException("Span is not in async mode, please use '#prepareForAsync' to active."); } if (isAsyncStopped) { - throw new RuntimeException("Can not do async finish for the span repeately."); + throw new RuntimeException("Can not do async finish for the span repeatedly."); } this.endTime = System.currentTimeMillis(); owner.asyncStop(this); diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/pom.xml b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/pom.xml index 8a25813b680c47a39a755394740fb71b282b5628..3090bf149d0f7d13edd55551753f305b28129ab2 100644 --- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/pom.xml +++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/pom.xml @@ -31,7 +31,7 @@ http://maven.apache.org - 3.6.3 + 3.9.0 diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplEndInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplEndInterceptor.java index d7daf033f12f6468c283ae0fdfc4cb00f705962d..1cc863c14ecc7d06e4d2a24d303efad466843d80 100644 --- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplEndInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplEndInterceptor.java @@ -33,29 +33,42 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine; import java.lang.reflect.Method; -public class HttpClientRequestImplEndInterceptor implements InstanceMethodsAroundInterceptor, InstanceConstructorInterceptor { +public class HttpClientRequestImplEndInterceptor implements InstanceMethodsAroundInterceptor { - @Override - public void onConstruct(EnhancedInstance objInst, Object[] allArguments) { - String host; - int port; - if (allArguments[3] instanceof Integer) { - host = (String) allArguments[2]; - port = (Integer) allArguments[3]; - } else { - host = (String) allArguments[3]; - port = (Integer) allArguments[4]; + public static class Version30XTo33XConstructorInterceptor implements InstanceConstructorInterceptor { + @Override + public void onConstruct(EnhancedInstance objInst, Object[] allArguments) { + String host = (String) allArguments[2]; + int port = (Integer) allArguments[3]; + objInst.setSkyWalkingDynamicField(host + ":" + port); + } + } + + public static class Version34XTo37XConstructorInterceptor implements InstanceConstructorInterceptor { + @Override + public void onConstruct(EnhancedInstance objInst, Object[] allArguments) { + String host = (String) allArguments[3]; + int port = (Integer) allArguments[4]; + objInst.setSkyWalkingDynamicField(host + ":" + port); + } + } + + public static class Version38PlusConstructorInterceptor implements InstanceConstructorInterceptor { + @Override + public void onConstruct(EnhancedInstance objInst, Object[] allArguments) { + String host = (String) allArguments[4]; + int port = (Integer) allArguments[5]; + objInst.setSkyWalkingDynamicField(host + ":" + port); } - objInst.setSkyWalkingDynamicField(host + ":" + port); } @Override - @SuppressWarnings("unchecked") public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, - MethodInterceptResult result) throws Throwable { + MethodInterceptResult result) { HttpClientRequest request = (HttpClientRequest) objInst; ContextCarrier contextCarrier = new ContextCarrier(); - AbstractSpan span = ContextManager.createExitSpan(toPath(request.uri()), contextCarrier, (String) objInst.getSkyWalkingDynamicField()); + AbstractSpan span = ContextManager.createExitSpan(toPath(request.uri()), contextCarrier, + (String) objInst.getSkyWalkingDynamicField()); span.setComponent(ComponentsDefine.VERTX); SpanLayer.asHttp(span); Tags.HTTP.METHOD.set(span, request.method().toString()); @@ -71,14 +84,14 @@ public class HttpClientRequestImplEndInterceptor implements InstanceMethodsAroun @Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, - Object ret) throws Throwable { + Object ret) { ContextManager.stopSpan(); return ret; } @Override public void handleMethodException(EnhancedInstance objInst, Method method, Object[] allArguments, - Class[] argumentsTypes, Throwable t) { + Class[] argumentsTypes, Throwable t) { ContextManager.activeSpan().errorOccurred().log(t); } diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java index cd112add6f2fce56b8473de21dcad77be9b5e450..cea72b028df2543d91c916098de9f621de05c926 100644 --- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpClientRequestImplHandleResponseInterceptor.java @@ -18,7 +18,9 @@ package org.apache.skywalking.apm.plugin.vertx3; +import io.vertx.core.http.HttpClientResponse; import org.apache.skywalking.apm.agent.core.context.ContextManager; +import org.apache.skywalking.apm.agent.core.context.tag.Tags; import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan; import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance; @@ -31,10 +33,10 @@ import java.lang.reflect.Method; public class HttpClientRequestImplHandleResponseInterceptor implements InstanceMethodsAroundInterceptor { @Override - @SuppressWarnings("unchecked") public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws Throwable { VertxContext context = (VertxContext) objInst.getSkyWalkingDynamicField(); + Tags.STATUS_CODE.set(context.getSpan(), Integer.toString(((HttpClientResponse) allArguments[0]).statusCode())); context.getSpan().asyncFinish(); AbstractSpan span = ContextManager.createLocalSpan("#" + context.getSpan().getOperationName()); diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplEndInterceptor.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplEndInterceptor.java index 3234e2bb4a867ded99058e66bab07c1ac3facde0..81423fe8a8fc41bdcc71f40823a4d513dbe9af6d 100644 --- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplEndInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/HttpServerResponseImplEndInterceptor.java @@ -18,7 +18,9 @@ package org.apache.skywalking.apm.plugin.vertx3; +import io.vertx.core.http.HttpServerResponse; import org.apache.skywalking.apm.agent.core.context.ContextManager; +import org.apache.skywalking.apm.agent.core.context.tag.Tags; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor; import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult; @@ -28,13 +30,11 @@ import java.lang.reflect.Method; public class HttpServerResponseImplEndInterceptor implements InstanceMethodsAroundInterceptor { @Override - @SuppressWarnings("unchecked") public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, MethodInterceptResult result) throws Throwable { - if (allArguments.length == 0) { - VertxContext context = (VertxContext) objInst.getSkyWalkingDynamicField(); - context.getSpan().asyncFinish(); - } + VertxContext context = (VertxContext) objInst.getSkyWalkingDynamicField(); + Tags.STATUS_CODE.set(context.getSpan(), Integer.toString(((HttpServerResponse) objInst).getStatusCode())); + context.getSpan().asyncFinish(); } @Override diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpClientRequestImplEndInstrumentation.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpClientRequestImplEndInstrumentation.java index 236c1fe75b245c2fb62c15f7f1f0bf2dc6f6cb58..bc8b2fa8a6281d6a7276109422477d25b56fbf37 100644 --- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpClientRequestImplEndInstrumentation.java +++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpClientRequestImplEndInstrumentation.java @@ -26,8 +26,8 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInst import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch; import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch; -import static net.bytebuddy.matcher.ElementMatchers.any; import static net.bytebuddy.matcher.ElementMatchers.named; +import static net.bytebuddy.matcher.ElementMatchers.takesArgument; /** * {@link HttpClientRequestImplEndInstrumentation} enhance the end method in @@ -42,40 +42,62 @@ public class HttpClientRequestImplEndInstrumentation extends ClassInstanceMethod @Override public ConstructorInterceptPoint[] getConstructorsInterceptPoints() { - return new ConstructorInterceptPoint[] { - new ConstructorInterceptPoint() { - @Override - public ElementMatcher getConstructorMatcher() { - return any(); - } + return new ConstructorInterceptPoint[]{ + new ConstructorInterceptPoint() { + @Override + public ElementMatcher getConstructorMatcher() { + return takesArgument(3, int.class); + } + + @Override + public String getConstructorInterceptor() { + return INTERCEPT_CLASS + "$Version30XTo33XConstructorInterceptor"; + } + }, + new ConstructorInterceptPoint() { + @Override + public ElementMatcher getConstructorMatcher() { + return takesArgument(4, int.class); + } + + @Override + public String getConstructorInterceptor() { + return INTERCEPT_CLASS + "$Version34XTo37XConstructorInterceptor"; + } + }, + new ConstructorInterceptPoint() { + @Override + public ElementMatcher getConstructorMatcher() { + return takesArgument(5, int.class); + } - @Override - public String getConstructorInterceptor() { - return INTERCEPT_CLASS; + @Override + public String getConstructorInterceptor() { + return INTERCEPT_CLASS + "$Version38PlusConstructorInterceptor"; + } } - } }; } @Override public InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() { - return new InstanceMethodsInterceptPoint[] { - new InstanceMethodsInterceptPoint() { - @Override - public ElementMatcher getMethodsMatcher() { - return named(ENHANCE_METHOD); - } + return new InstanceMethodsInterceptPoint[]{ + new InstanceMethodsInterceptPoint() { + @Override + public ElementMatcher getMethodsMatcher() { + return named(ENHANCE_METHOD); + } - @Override - public String getMethodsInterceptor() { - return INTERCEPT_CLASS; - } + @Override + public String getMethodsInterceptor() { + return INTERCEPT_CLASS; + } - @Override - public boolean isOverrideArgs() { - return false; + @Override + public boolean isOverrideArgs() { + return false; + } } - } }; } diff --git a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpServerResponseImplEndInstrumentation.java b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpServerResponseImplEndInstrumentation.java index e7ce3973a74eb9d83c87d749bba22a0a39d36c28..958419419bd28f5991704683faebe44c2d00fa69 100644 --- a/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpServerResponseImplEndInstrumentation.java +++ b/apm-sniffer/apm-sdk-plugin/vertx-plugins/vertx-core-3.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/vertx3/define/HttpServerResponseImplEndInstrumentation.java @@ -27,6 +27,7 @@ import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch; import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch; import static net.bytebuddy.matcher.ElementMatchers.named; +import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentTypeNameMatch.takesArgumentWithType; /** * {@link HttpServerResponseImplEndInstrumentation} enhance the end method in @@ -36,8 +37,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named; public class HttpServerResponseImplEndInstrumentation extends ClassInstanceMethodsEnhancePluginDefine { private static final String ENHANCE_CLASS = "io.vertx.core.http.impl.HttpServerResponseImpl"; - private static final String ENHANCE_METHOD = "end"; - private static final String INTERCEPT_CLASS = "org.apache.skywalking.apm.plugin.vertx3.HttpServerResponseImplEndInterceptor"; + private static final String INTERCEPTOR_CLASS = "org.apache.skywalking.apm.plugin.vertx3.HttpServerResponseImplEndInterceptor"; @Override public ConstructorInterceptPoint[] getConstructorsInterceptPoints() { @@ -50,12 +50,17 @@ public class HttpServerResponseImplEndInstrumentation extends ClassInstanceMetho new InstanceMethodsInterceptPoint() { @Override public ElementMatcher getMethodsMatcher() { - return named(ENHANCE_METHOD); + return named("end0") //ver. 3.0.0 - 3.5.4 + .or(named("end") //ver. 3.6.0 - 3.7.0 + .and(takesArgumentWithType(0, "io.vertx.core.buffer.Buffer"))) + .or(named("end") //ver. 3.7.1+ + .and(takesArgumentWithType(0, "io.vertx.core.buffer.Buffer")) + .and(takesArgumentWithType(1, "io.netty.channel.ChannelPromise"))); } @Override public String getMethodsInterceptor() { - return INTERCEPT_CLASS; + return INTERCEPTOR_CLASS; } @Override diff --git a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml index 27acc2621c86862b585822305ae659f5e02b7a80..ee808053b91cd2e3950a24e0de0967c6dfa52c03 100644 --- a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml +++ b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/config/expectedData.yaml @@ -15,8 +15,26 @@ # limitations under the License. segmentItems: - serviceName: vertx-eventbus-3.x-scenario - segmentSize: 7 + segmentSize: 8 segments: + - segmentId: not null + spans: + - operationName: /vertx-eventbus-3-scenario/case/healthCheck + 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: HEAD} + - {key: url, value: /vertx-eventbus-3-scenario/case/healthCheck} + - {key: status_code, value: '200'} - segmentId: not null spans: - operationName: local-message-receiver @@ -58,6 +76,7 @@ segmentItems: tags: - {key: http.method, value: GET} - {key: url, value: /vertx-eventbus-3-scenario/case/executeTest} + - {key: status_code, value: '200'} - operationName: /vertx-eventbus-3-scenario/case/eventbus-case operationId: 0 parentSpanId: -1 @@ -73,6 +92,7 @@ segmentItems: tags: - {key: http.method, value: GET} - {key: url, value: /vertx-eventbus-3-scenario/case/eventbus-case} + - {key: status_code, value: '200'} - segmentId: not null spans: - operationName: '#/vertx-eventbus-3-scenario/case/executeTest' @@ -133,6 +153,7 @@ segmentItems: tags: - {key: http.method, value: GET} - {key: url, value: /vertx-eventbus-3-scenario/case/executeTest} + - {key: status_code, value: '200'} refs: - {parentEndpoint: /vertx-eventbus-3-scenario/case/eventbus-case, networkAddress: 'localhost:8080', refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null, diff --git a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/pom.xml b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/pom.xml index 2765e6ab1cb7dccba74ca1f377a96dc94630a2f4..e0af4c17b3c14fe6966dd74b37d702fe9a3f5e51 100644 --- a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/pom.xml +++ b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/pom.xml @@ -30,7 +30,7 @@ UTF-8 1.8 - 3.7.0 + 3.9.0 skywalking-vertx-eventbus-3.x-scenario diff --git a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxeventbus/controller/VertxEventbusController.java b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxeventbus/controller/VertxEventbusController.java index 7e9981779e98b7bb5aad19ae4f5587ff8c55209a..70f71a70e379e8739f3e66959826ffa82793db77 100644 --- a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxeventbus/controller/VertxEventbusController.java +++ b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxeventbus/controller/VertxEventbusController.java @@ -30,7 +30,7 @@ public class VertxEventbusController extends AbstractVerticle { @Override public void start() { Router router = Router.router(vertx); - router.get("/vertx-eventbus-3-scenario/case/eventbus-case").handler(this::handleCoreCase); + router.get("/vertx-eventbus-3-scenario/case/eventbus-case").handler(this::handleEventbusCase); router.get("/vertx-eventbus-3-scenario/case/executeTest").handler(this::executeTest); router.head("/vertx-eventbus-3-scenario/case/healthCheck").handler(this::healthCheck); vertx.createHttpServer().requestHandler(router::accept).listen(8080); @@ -39,7 +39,7 @@ public class VertxEventbusController extends AbstractVerticle { vertx.deployVerticle(LocalReceiver.class.getName()); } - private void handleCoreCase(RoutingContext routingContext) { + private void handleEventbusCase(RoutingContext routingContext) { vertx.createHttpClient().getNow(8080, "localhost", "/vertx-eventbus-3-scenario/case/executeTest", it -> routingContext.response().setStatusCode(it.statusCode()).end()); diff --git a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/support-version.list b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/support-version.list index 8273d93a610190b95592b7efcb9f88b1b7cb19eb..071d082029b001240e0c09b0ac12f27ff5e84f65 100644 --- a/test/plugin/scenarios/vertx-eventbus-3.x-scenario/support-version.list +++ b/test/plugin/scenarios/vertx-eventbus-3.x-scenario/support-version.list @@ -14,6 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +3.9.0 +3.8.5 +3.8.4 +3.8.3 +3.8.2 +3.8.1 +3.8.0 +3.7.1 3.7.0 3.6.3 3.6.2 diff --git a/test/plugin/scenarios/vertx-web-3.x-scenario/config/expectedData.yaml b/test/plugin/scenarios/vertx-web-3.x-scenario/config/expectedData.yaml index a8be66ceabf3f4edce7af6e10e6a703a44e9bb6e..8f888541570417958f832d25a674a0e2931fabc1 100644 --- a/test/plugin/scenarios/vertx-web-3.x-scenario/config/expectedData.yaml +++ b/test/plugin/scenarios/vertx-web-3.x-scenario/config/expectedData.yaml @@ -15,9 +15,50 @@ # limitations under the License. segmentItems: - serviceName: vertx-web-3.x-scenario - segmentSize: 2 + segmentSize: 4 segments: - - segmentId: nq 0 + - segmentId: not null + spans: + - operationName: /vertx-web-3-scenario/case/healthCheck + 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: HEAD} + - {key: url, value: /vertx-web-3-scenario/case/healthCheck} + - {key: status_code, value: '200'} + - segmentId: not null + spans: + - operationName: /vertx-web-3-scenario/case/healthCheck + 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: HEAD} + - {key: url, value: /vertx-web-3-scenario/case/healthCheck} + - {key: status_code, value: '200'} + refs: + - {parentEndpoint: /vertx-web-3-scenario/case/web-case, networkAddress: 'localhost:8080', + refType: CrossProcess, parentSpanId: 1, parentTraceSegmentId: not null, + parentServiceInstance: not null, parentService: vertx-web-3.x-scenario, + traceId: not null} + - segmentId: not null spans: - operationName: /vertx-web-3-scenario/case/healthCheck operationId: 0 @@ -32,8 +73,9 @@ segmentItems: peer: localhost:8080 skipAnalysis: false tags: - - {key: http.method, value: GET} + - {key: http.method, value: HEAD} - {key: url, value: /vertx-web-3-scenario/case/healthCheck} + - {key: status_code, value: '200'} - operationName: /vertx-web-3-scenario/case/web-case operationId: 0 parentSpanId: -1 @@ -49,7 +91,8 @@ segmentItems: tags: - {key: http.method, value: GET} - {key: url, value: /vertx-web-3-scenario/case/web-case} - - segmentId: nq 0 + - {key: status_code, value: '200'} + - segmentId: not null spans: - operationName: '#/vertx-web-3-scenario/case/healthCheck' operationId: 0 @@ -68,4 +111,3 @@ segmentItems: refType: CrossThread, parentSpanId: 1, parentTraceSegmentId: not null, parentServiceInstance: not null, parentService: vertx-web-3.x-scenario, traceId: not null} - diff --git a/test/plugin/scenarios/vertx-web-3.x-scenario/pom.xml b/test/plugin/scenarios/vertx-web-3.x-scenario/pom.xml index 58d64e9894b6f3d29a128419e7c1388e2d320c2b..8f6c3daa0036d4750ffbf98d589398c6b1e6ef8a 100644 --- a/test/plugin/scenarios/vertx-web-3.x-scenario/pom.xml +++ b/test/plugin/scenarios/vertx-web-3.x-scenario/pom.xml @@ -30,7 +30,7 @@ UTF-8 1.8 - 3.7.0 + 3.9.0 skywalking-vertx-web-3.x-scenario diff --git a/test/plugin/scenarios/vertx-web-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java b/test/plugin/scenarios/vertx-web-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java index 40c70f3734ae1a503e3e4a2372f454ca987a3bf7..7da26aa6363d3f95b10ec546ab0ad0738460cbdf 100644 --- a/test/plugin/scenarios/vertx-web-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java +++ b/test/plugin/scenarios/vertx-web-3.x-scenario/src/main/java/org/apache/skywalking/apm/testcase/vertxweb/controller/VertxWebController.java @@ -32,7 +32,7 @@ public class VertxWebController extends AbstractVerticle { } private void handleCoreCase(RoutingContext routingContext) { - vertx.createHttpClient().getNow(8080, "localhost", + vertx.createHttpClient().headNow(8080, "localhost", "/vertx-web-3-scenario/case/healthCheck", it -> routingContext.response().setStatusCode(it.statusCode()).end()); } diff --git a/test/plugin/scenarios/vertx-web-3.x-scenario/support-version.list b/test/plugin/scenarios/vertx-web-3.x-scenario/support-version.list index 3582c97d124db0799415e2b46d818bcca988b52c..db205eb25959c40cb585e5a759bae29a8b18e382 100644 --- a/test/plugin/scenarios/vertx-web-3.x-scenario/support-version.list +++ b/test/plugin/scenarios/vertx-web-3.x-scenario/support-version.list @@ -14,6 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. +3.9.0 +3.8.5 +3.8.4 +3.8.3 +3.8.2 +3.8.1 +3.8.0 +3.7.1 3.7.0 3.6.3 3.6.2