diff --git a/server-common/src/main/java/org/apache/kafka/server/metrics/s3stream/S3StreamKafkaMetricsManager.java b/server-common/src/main/java/org/apache/kafka/server/metrics/s3stream/S3StreamKafkaMetricsManager.java index 67ff5ab976..199fee20fa 100644 --- a/server-common/src/main/java/org/apache/kafka/server/metrics/s3stream/S3StreamKafkaMetricsManager.java +++ b/server-common/src/main/java/org/apache/kafka/server/metrics/s3stream/S3StreamKafkaMetricsManager.java @@ -118,7 +118,7 @@ private static void initAutoBalancerMetrics(Meter meter, String prefix) { .setDescription("The number of partitions for each topic on each broker") .ofLongs() .buildWithCallback(result -> { - if (MetricsLevel.INFO.isWithin(metricsConfig.getMetricsLevel()) && isActiveSupplier.get()) { + if (MetricsLevel.INFO.isWithin(metricsConfig.getMetricsLevel())) { PartitionCountDistribution partitionCountDistribution = topicPartitionCountSupplier.get(); if (partitionCountDistribution == null) { return;