Please answer these questions before submitting your issue.
Bug
-
Which version of SkyWalking, OS and JRE?
apache-skywalking-apm-6.1.0
-
What happen?
apm-trace-ignore-plugin-6.1.0
org.apache.skywalking.apm.plugin.trace.ignore.matcher.AntPathMatcher(IgnoreAntPathMatcher)
org.springframework.util.AntPathMatcher (SpringAntPathMatcher)
IgnoreAntPathMatcher and SpringAntPathMatcher show inconsistent performance
I copied the IgnoreAntPathMatcher source code and tested it.
cod:
private static IgnoreAntPathMatcher MpathMatcher = new IgnoreAntPathMatcher();
private static AntPathMatcher antPathMatcher = new AntPathMatcher();
public static void main(String str[])
{
String operationName ="/rtp/topic/findPage";
String pattens = "/**/svn/**";
if (!StringUtil.isEmpty(pattens)) {
String path = operationName;
if (!StringUtil.isEmpty(path) && path.length() > 1 && path.endsWith("/")) {
path = path.substring(0, path.length() - 1);
}
for (String pattern : pattens.split(",")) {
if (antPathMatcher.match(pattern, path)) { //false
log.info("antPathMatcher operationName : " + operationName + " Ignore tracking");
}
}
for (String pattern : pattens.split(",")) {
if (MpathMatcher.match(pattern, path)) { // true
log.info("MpathMatcher operationName : " + operationName + " Ignore tracking"); // 11:30:37.189 [main] INFO IgnorePathTest - MpathMatcher operationName : /rtp/topic/findPage Ignore tracking
}
}
}
}
I think SpringAntPathMatcher meets my matching requirements better.
Please answer these questions before submitting your issue.
Bug
Which version of SkyWalking, OS and JRE?
apache-skywalking-apm-6.1.0
What happen?
apm-trace-ignore-plugin-6.1.0
org.apache.skywalking.apm.plugin.trace.ignore.matcher.AntPathMatcher(IgnoreAntPathMatcher)
org.springframework.util.AntPathMatcher (SpringAntPathMatcher)
IgnoreAntPathMatcher and SpringAntPathMatcher show inconsistent performance
I copied the IgnoreAntPathMatcher source code and tested it.
cod:
I think SpringAntPathMatcher meets my matching requirements better.