From 102d35190b31bc630846839e25e8288e94f648af Mon Sep 17 00:00:00 2001 From: Federico Valeri Date: Fri, 16 May 2025 11:58:01 +0200 Subject: [PATCH] MINOR: Add JmxReporter note to metric.reporters (#19706) According to KIP-830, in Kafka 4 users currently relying on JmxReporter and that are using additional reporters via metric.reporters will have to include org.apache.kafka.common.metrics.JmxReporter in metric.reporters. Reviewers: Mickael Maison --- .../java/org/apache/kafka/clients/CommonClientConfigs.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java b/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java index df3d66aaa7c..75bde0ee722 100644 --- a/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java +++ b/clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java @@ -126,7 +126,9 @@ public class CommonClientConfigs { "\n" + "TRACE level records all possible metrics, capturing every detail about the system's performance and operation. It's best for controlled environments where in-depth analysis is required, though it can introduce significant overhead."; public static final String METRIC_REPORTER_CLASSES_CONFIG = "metric.reporters"; - public static final String METRIC_REPORTER_CLASSES_DOC = "A list of classes to use as metrics reporters. Implementing the org.apache.kafka.common.metrics.MetricsReporter interface allows plugging in classes that will be notified of new metric creation."; + public static final String METRIC_REPORTER_CLASSES_DOC = "A list of classes to use as metrics reporters. " + + "Implementing the org.apache.kafka.common.metrics.MetricsReporter interface allows plugging in classes that will be notified of new metric creation. " + + "When custom reporters are set and org.apache.kafka.common.metrics.JmxReporter is needed, it has to be explicitly added to the list."; public static final String METRICS_CONTEXT_PREFIX = "metrics.context.";