GitHub user wushujames opened a pull request: https://github.com/apache/kafka/pull/3799
KAFKA-5597 [WIP] Alternate way to do Metrics docs generation I was about to start on the next round of autogeneration of metrics docs, but I wanted to @guozhangwang 's opinion on this first. This is a possible alternate way to do autogeneration of metrics docs, that possibly looks a little nicer for the developer. Posting this to get some feedback on if the original way looks better, or if this new way looks better. Instead of having the metrics registry and the org.apache.kafka.common.metrics.Metrics object be separate things, have the metrics registry hold a copy of the Metrics object. That way, all the metricInstance stuff is hidden, and we don't have to make sure that the metrics registry and the Metrics object are configured identicailly (with the same tags). I personally think this looks a little better. You can merge this pull request into a Git repository by running: $ git pull https://github.com/wushujames/kafka producer_sender_metrics_docs_different Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3799.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3799 ---- commit 7b48ab7030c58879103bccf8c3f7dff59444a6a6 Author: James Cheng <jylch...@yahoo.com> Date: 2017-09-06T07:23:23Z Instead of having the metrics registry and the org.apache.kafka.common.metrics.Metrics object be separate things, have the metrics registry hold a copy of the Metrics object. That way, all the metricInstance stuff is hidden, and we don't have to make sure they are configured identicailly (with the same tags). ---- ---