You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "kezhenxu94 (via GitHub)" <gi...@apache.org> on 2023/03/03 04:22:05 UTC

[GitHub] [skywalking-java] kezhenxu94 commented on a diff in pull request #466: fix tomcat-10x-plugin and add test case to support tomcat7.x-8.x-9.x

kezhenxu94 commented on code in PR #466:
URL: https://github.com/apache/skywalking-java/pull/466#discussion_r1124011185


##########
apm-sniffer/apm-sdk-plugin/tomcat-10x-plugin/src/main/java/org/apache/skywalking/apm/plugin/tomcat10x/TomcatInvokeInterceptor.java:
##########
@@ -82,9 +75,9 @@ public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allA
         HttpServletResponse response = (HttpServletResponse) allArguments[1];
 
         AbstractSpan span = ContextManager.activeSpan();
-        if (IS_SERVLET_GET_STATUS_METHOD_EXIST && response.getStatus() >= 400) {
+        Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus());
+        if (response.getStatus() >= 400) {

Review Comment:
   I think this fixes the issue I mentioned



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org