apovzner commented on a change in pull request #8768: URL: https://github.com/apache/kafka/pull/8768#discussion_r439786166
########## File path: clients/src/main/java/org/apache/kafka/common/metrics/JmxReporter.java ########## @@ -161,6 +162,9 @@ private KafkaMbean removeAttribute(KafkaMetric metric, String mBeanName) { private String addAttribute(KafkaMetric metric) { try { MetricName metricName = metric.metricName(); + if (metricName.tags().containsKey(DO_NOT_REPORT_TAG)) { + return null; + } Review comment: You are right, I replaced this with your first alternative. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org