Skip to content

Commit 8968db0

Browse files
committed
fix issue that the span operation name of spring mvc is null
1 parent fd57c7c commit 8968db0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apm-sniffer/apm-sdk-plugin/spring-plugins/mvc-annotation-4.x-plugin/src/main/java/org/skywalking/apm/plugin/spring/mvc/ControllerServiceMethodInterceptor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
3030
RequestMapping methodRequestMapping = method.getAnnotation(RequestMapping.class);
3131
if (methodRequestMapping.value().length > 0) {
3232
requestURL = methodRequestMapping.value()[0];
33+
} else if (methodRequestMapping.path().length > 0) {
34+
requestURL = methodRequestMapping.path()[0];
3335
} else {
3436
requestURL = "";
3537
}

0 commit comments

Comments
 (0)