From 7819b43afabed411fdadc9df701c8c4a3afd8398 Mon Sep 17 00:00:00 2001 From: Shichao Nie Date: Wed, 14 Aug 2024 20:55:24 +0800 Subject: [PATCH] fix(metrics): topic partition count metrics should be reported by all brokers Signed-off-by: Shichao Nie --- .../server/metrics/s3stream/S3StreamKafkaMetricsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;