yswdqz commented on code in PR #9822:
URL: https://github.com/apache/skywalking/pull/9822#discussion_r1003350251
##########
oap-server/analyzer/meter-analyzer/src/main/java/org/apache/skywalking/oap/meter/analyzer/prometheus/rule/Rules.java:
##########
@@ -55,24 +57,24 @@ public static List<Rule> loadRules(final String path,
List<String> enabledRules)
} catch (FileNotFoundException e) {
throw new ModuleStartException("Load fetcher rules failed", e);
}
- final List<String> formedEnabledRules =
- enabledRules
- .stream()
- .map(rule -> {
- if (rule.startsWith("/")) {
- rule = rule.substring(1);
- }
- if (rule.endsWith(".yaml")) {
- return rule;
- } else if (rule.endsWith(".yml")) {
- return rule.substring(0, rule.length() - 2) +
"aml";
- } else {
- return rule + ".yaml";
- }
- })
- .collect(Collectors.toList());
+ Map<String, Boolean> formedEnabledRules = enabledRules
Review Comment:
This is used to determine whether an enabled rule does not have a
corresponding configuration file
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]