You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by bf...@apache.org on 2021/06/12 00:31:15 UTC
[skywalking] 01/01: Update TomcatInvokeInterceptor.java
This is an automated email from the ASF dual-hosted git repository.
bfergerson pushed a commit to branch BFergerson-patch-1
in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 1d554944b9c8b4df92ebcec485df95ff227850bc
Author: Brandon Fergerson <fe...@gmail.com>
AuthorDate: Fri Jun 11 20:30:50 2021 -0400
Update TomcatInvokeInterceptor.java
---
.../skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
index f54ab78..14fde29 100644
--- a/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
+++ b/apm-sniffer/apm-sdk-plugin/tomcat-7.x-8.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat78x/TomcatInvokeInterceptor.java
@@ -75,9 +75,11 @@ public class TomcatInvokeInterceptor implements InstanceMethodsAroundInterceptor
next.setHeadValue(request.getHeader(next.getHeadKey()));
}
- AbstractSpan span = ContextManager.createEntrySpan(request.getRequestURI(), contextCarrier);
+ String requestMethod = request.getMethod();
+ AbstractSpan span = ContextManager.createEntrySpan(
+ String.format("{%s}%s", requestMethod, request.getRequestURI()), contextCarrier);
Tags.URL.set(span, request.getRequestURL().toString());
- Tags.HTTP.METHOD.set(span, request.getMethod());
+ Tags.HTTP.METHOD.set(span, requestMethod);
span.setComponent(ComponentsDefine.TOMCAT);
SpanLayer.asHttp(span);