You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/04/13 23:29:06 UTC
[incubator-skywalking] branch master updated: Fix create multiple
EntrySpan (#2482)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 2f8e19f Fix create multiple EntrySpan (#2482)
2f8e19f is described below
commit 2f8e19f3ef733fa20dd95b25e993c80737ac5eda
Author: FuCheng,Yan <ya...@gmail.com>
AuthorDate: Sun Apr 14 07:28:58 2019 +0800
Fix create multiple EntrySpan (#2482)
---
.../plugin/spring/webflux/v5/OnInboundNextInterceptor.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/OnInboundNextInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/OnInboundNextInterceptor.java
index d439ce1..e6031f7 100644
--- a/apm-sniffer/apm-sdk-plugin/spring-plugins/webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/OnInboundNextInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/webflux-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/spring/webflux/v5/OnInboundNextInterceptor.java
@@ -45,11 +45,13 @@ public class OnInboundNextInterceptor implements InstanceMethodsAroundIntercepto
next.setHeadValue(request.headers().get(next.getHeadKey()));
}
- AbstractSpan span = ContextManager.createEntrySpan(request.uri(), contextCarrier);
- Tags.URL.set(span, request.uri());
- Tags.HTTP.METHOD.set(span, request.method().name());
- span.setComponent(ComponentsDefine.SPRING_MVC_ANNOTATION);
- SpanLayer.asHttp(span);
+ if (allArguments[1] instanceof HttpRequest) {
+ AbstractSpan span = ContextManager.createEntrySpan(request.uri(), contextCarrier);
+ Tags.URL.set(span, request.uri());
+ Tags.HTTP.METHOD.set(span, request.method().name());
+ span.setComponent(ComponentsDefine.SPRING_MVC_ANNOTATION);
+ SpanLayer.asHttp(span);
+ }
}
}