You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "d4v1de (via GitHub)" <gi...@apache.org> on 2025/11/05 22:41:20 UTC

Re: [PR] Implementing KIP-977 [kafka]

d4v1de commented on code in PR #20397:
URL: https://github.com/apache/kafka/pull/20397#discussion_r2496423789


##########
clients/src/main/java/org/apache/kafka/clients/CommonClientConfigs.java:
##########
@@ -132,6 +132,24 @@ public class CommonClientConfigs {
 
     public static final String METRICS_CONTEXT_PREFIX = "metrics.context.";
 
+    public static final String METRICS_VERBOSITY_CONFIG = "metrics.verbosity";
+    public static final String METRICS_VERBOSITY_DOC = "Controls the verbosity of metrics reporting. This configuration accepts a JSON array string that specifies " +
+        "verbosity levels for specific metrics and scopes. Each array element should contain:\n" +
+        "- <code>level</code>: Verbosity level (\"high\", \"medium\", or \"low\")\n" +
+        "- <code>name</code>: Metric name pattern (supports regex)\n" +
+        "- <code>filters</code>: Scope filters to apply the verbosity level\n\n" +
+        "Example:\n" +
+        "<pre>\n" +
+        "[\n" +
+        "  {\n" +
+        "    \"level\": \"high\",\n" +
+        "    \"name\": \"Bytes*\",\n" +
+        "    \"filters\": [{\"topics\": [\"car\", \"bus\", \"plane\"]}]\n" +
+        "  }\n" +
+        "]\n" +
+        "</pre>\n" +
+        "This example applies 'high' verbosity to all metrics starting with 'Bytes' for the specified topics (car, bus, plane).";

Review Comment:
   Have you considered adding more information about the filters format, as they are described [here](https://cwiki.apache.org/confluence/display/KAFKA/KIP-977%3A+Partition-Level+Throughput+Metrics#KIP977:PartitionLevelThroughputMetrics-JSONConfigFormat) in the KIP?



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org