reswqa commented on code in PR #26999:
URL: https://github.com/apache/flink/pull/26999#discussion_r3025698003


##########
flink-metrics/flink-metrics-prometheus/src/main/java/org/apache/flink/metrics/prometheus/AbstractPrometheusReporter.java:
##########
@@ -97,6 +108,11 @@ public void close() {
     @Override
     public void notifyOfAddedMetric(
             final Metric metric, final String metricName, final MetricGroup 
group) {
+        String metricScope = 
LogicalScopeProvider.castFrom(group).getLogicalScope(CHARACTER_FILTER);
+        if (!allowLists.isEmpty()
+                && !isInAllowList(metricScope + DEFAULT_SCOPE_SEPARATOR + 
metricName, allowLists)) {
+            return;
+        }

Review Comment:
   ```java
   if (!allowLists.isEmpty()) {
       String metricScope = 
LogicalScopeProvider.castFrom(group).getLogicalScope(CHARACTER_FILTER);
       String fullMetricName = metricScope + DEFAULT_SCOPE_SEPARATOR + 
metricName;
       if (!isInAllowList(fullMetricName, allowLists)) {
           return;
       }
   }
   ```



-- 
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]

Reply via email to