You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "James Cheng (JIRA)" <ji...@apache.org> on 2016/05/25 23:12:12 UTC

[jira] [Commented] (KAFKA-3480) Autogenerate metrics documentation

    [ https://issues.apache.org/jira/browse/KAFKA-3480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301077#comment-15301077 ] 

James Cheng commented on KAFKA-3480:
------------------------------------

Now that 0.10 is out (Congrats everyone!) I wanted to get some feedback on this again.  Please take a look at the proof of concept in https://github.com/apache/kafka/pull/1202, as well as the sample output files attached to this JIRA,

The reason for this approach I wanted a single approach that could handle fixed MBean names, like:
{code}
kafka.server:type=BrokerTopicMetrics,name=MessagesInPerSec	
{code}
as well as names that have runtime added tags, such as:
{code}
kafka.server:type=FetcherLagMetrics,name=ConsumerLag,clientId=([-.\w]+),topic=([-.\w]+),partition=([0-9]+)	{code}

Tags such as "clientId" and "topic" and "partition" in the example above are currently defined at runtime. My proof of concept above attempts to put those tags into the "registry" at compile time, but to have the tag *values* filled out at runtime. This allows me to autogenerate docs that include the tags in the MBean names.

I think (it's been a while) that the approach above only generates docs for KafkaMetrics. It does not auto-generate docs for Yammer Metrics. Which is actually kind of unfortunately (for me) because what I *really* wanted to solve was auto-generated docs for the broker metrics! Some of them are currently wrong. For example, the docs say
{code}
kafka.server:type=ProducerRequestPurgatory,name=PurgatorySize
{code}

when it is actually
{code}
kafka.server:type=DelayedOperationPurgatory,name=NumDelayedOperations,delayedOperation=Produce
or
kafka.server:type=DelayedOperationPurgatory,name=PurgatorySize,delayedOperation=Produce
{code}
Not sure which ones, actually.

Anyway, let's start the discussion back up and see where we want to go with this.


> Autogenerate metrics documentation
> ----------------------------------
>
>                 Key: KAFKA-3480
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3480
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: Jason Gustafson
>            Assignee: James Cheng
>         Attachments: Screen Shot 2016-04-07 at 6.52.19 PM.png, sample_metrics.html
>
>
> 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)