Skip to content

Commit

Permalink
fix the operation name of spring mvc span is incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
ascrutae committed Sep 27, 2017
1 parent 2503604 commit 7c279d7
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -24,7 +24,11 @@ public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
String basePath = "";
RequestMapping basePathRequestMapping = objInst.getClass().getAnnotation(RequestMapping.class);
if (basePathRequestMapping != null) {
basePath = basePathRequestMapping.value()[0];
if (basePathRequestMapping.value().length > 0) {
basePath = basePathRequestMapping.value()[0];
} else if (basePathRequestMapping.path().length > 0) {
basePath = basePathRequestMapping.path()[0];
}
}
PathMappingCache pathMappingCache = new PathMappingCache(basePath);
objInst.setSkyWalkingDynamicField(pathMappingCache);
Expand Down

0 comments on commit 7c279d7

Please sign in to comment.