dlmarion commented on code in PR #5616:
URL: https://github.com/apache/accumulo/pull/5616#discussion_r2144974040
##########
core/src/main/java/org/apache/accumulo/core/conf/Property.java:
##########
@@ -365,6 +365,9 @@ public enum Property {
"A comma separated list of tags to emit with all metrics from the
process. Example:"
+ "\"tag1=value1,tag2=value2\".",
"4.0.0"),
+ GENERAL_MICROMETER_ID_FILTERS("general.micrometer.id.filters", "",
PropertyType.STRING,
+ "A comma separated list of patterns to deny meters with matching id
names. Example: \"foo.*,bar\".",
+ "4.0"),
Review Comment:
```suggestion
"4.0.0"),
```
##########
server/base/src/main/java/org/apache/accumulo/server/metrics/MetricsInfoImpl.java:
##########
@@ -237,6 +254,41 @@ public synchronized void close() {
Metrics.globalRegistry.close();
}
+ /**
+ * Description of what the function does.
+ *
+ * @param patternList Description of what this variable is, i.e.
comma-delimited regext patterns
+ * @return description of what this function returns, i.e. a predicate
+ */
+ public static MeterFilter getMeterFilter(String patternList) {
+ requireNonNull(patternList, "patternList must not be null");
+ Preconditions.checkArgument(!patternList.isEmpty(), "patternList must not
be empty");
+
+ String[] patterns = patternList.split(",");
+ Predicate<Meter.Id> finalPredicate = null;
+
+ for (String pattern : patterns) {
+ // Compile the pattern.
Review Comment:
I'm wondering if we need to trim whitespace from each pattern
--
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]