From e040e897eebd6658ae792a81cf95f19f10a240d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Sat, 30 Sep 2017 09:30:46 +0800 Subject: [PATCH 1/4] Update README_ZH.md --- README_ZH.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_ZH.md b/README_ZH.md index 12edcffdb..f86fcd3cc 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -60,7 +60,7 @@ This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDU - JVM明细信息 - + - 服务依赖树. From 131db17a290e44d0d227a87291a18534523d795a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Sat, 30 Sep 2017 09:31:10 +0800 Subject: [PATCH 2/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 15037a4f1..09eb5e25c 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDU - JVM Detail. - + - Services Dependency Tree. From 62ffa4204bd8849f70f0c48e28e83a71d36804bb Mon Sep 17 00:00:00 2001 From: ascrutae Date: Sat, 30 Sep 2017 13:32:49 +0800 Subject: [PATCH 3/4] support @RequestMapping annotation of spring 3.x --- .../plugin/spring/mvc/ControllerServiceMethodInterceptor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java index 08967f935..839bed779 100644 --- a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java @@ -16,6 +16,7 @@ import org.skywalking.apm.network.trace.component.ComponentsDefine; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; +import org.springframework.web.context.request.ServletWebRequest; /** * The ControllerServiceMethodInterceptor only use the first mapping value. @@ -58,7 +59,7 @@ public class ControllerServiceMethodInterceptor implements InstanceMethodsAround @Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, Object ret) throws Throwable { - HttpServletResponse response = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getResponse(); + HttpServletResponse response = ((ServletWebRequest)RequestContextHolder.getRequestAttributes()).getResponse(); AbstractSpan span = ContextManager.activeSpan(); if (response.getStatus() >= 400) { From d56aa6effde4d4599f58916bf834e5440d25a58d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=99=9F=20Wu=20Sheng?= Date: Sat, 30 Sep 2017 15:08:47 +0800 Subject: [PATCH 4/4] Revert "support @RequestMapping annotation of spring 3.x" --- .../plugin/spring/mvc/ControllerServiceMethodInterceptor.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java index 839bed779..08967f935 100644 --- a/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java @@ -16,7 +16,6 @@ import org.skywalking.apm.network.trace.component.ComponentsDefine; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; -import org.springframework.web.context.request.ServletWebRequest; /** * The ControllerServiceMethodInterceptor only use the first mapping value. @@ -59,7 +58,7 @@ public class ControllerServiceMethodInterceptor implements InstanceMethodsAround @Override public Object afterMethod(EnhancedInstance objInst, Method method, Object[] allArguments, Class[] argumentsTypes, Object ret) throws Throwable { - HttpServletResponse response = ((ServletWebRequest)RequestContextHolder.getRequestAttributes()).getResponse(); + HttpServletResponse response = ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getResponse(); AbstractSpan span = ContextManager.activeSpan(); if (response.getStatus() >= 400) {