[
https://issues.apache.org/jira/browse/KAFKA-3480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15231481#comment-15231481
]
James Cheng commented on KAFKA-3480:
------------------------------------
[~hachikuji] and [~gwenshap], I uploaded a work-in-progress pull request for
this. It does something similar to ConfigDef, in that there is a file that
contains predefined metrics with docs, and that code that uses them references
the file. However, it was a little more complicated because the metrics can
sometimes have variables in them (e.g. "topics.{topic}.bytes-fetched"), and
those variables are defined at runtime. I created a class called
MetricNameTemplate which contains all the pre-known information (group,
keyname) as well as the variable names.
For proof of concept, I applied this approach to the metrics in the
TestMetrics.java class.
I will attach a sample file/screenshot of one of the generated docs.
> Autogenerate metrics documentation
> ----------------------------------
>
> Key: KAFKA-3480
> URL: https://issues.apache.org/jira/browse/KAFKA-3480
> Project: Kafka
> Issue Type: Improvement
> Reporter: Jason Gustafson
>
> Metrics documentation is done manually, which means it's hard to keep it
> current. It would be nice to have automatic generation of this documentation
> as we have for configs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)