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

Manikumar Reddy commented on KAFKA-1723:
----------------------------------------

Thanks for summarizing the solution.  your description of the patch is correct. 

Standard JMX MBean ^1^ name looks like this

domainName:type=type1,key1=val1,key2=val2,....

After the proposed changes , data model maps like this

domainName = prefix supplied to JMXReporter. Each JmxReporter instance will be 
associated with one domain.  ex: kafka.producer, kafka.consumer

type = group/ type of the metric. It is mandatory parameter.
key/val pairs = tags/attrs of the metrics. It can be optional parameter.

Example:
kafka.producer:type=ProducerMetrics,clientId=console-producer
kafka.producer:type=ProducerTopicMetrics,clientId=console-producer,topic=TEST

{quote}
Can we define what group and tags in a way outside of JMX? 
{quote}
group and tags/attrs are generic properties of metrics. These props can be
used to uniquely identify the metrics.
{quote}
What is the data model of various metric collection systems (graphite or 
whatever?) and would these map to that?
{quote}
We are more concerned about giving standard mbean names. So that JMX Clients 
(jmxtrans , jmxterm, etc..) can configured for collection. Different monitoring 
tools have different data storage model. 

{quote}
Should group be optional with some reasonable default? Should tags?
{quote}
Group  name is mandatory. It is required to uniquely identify the MBean object.
Tags can be optional. In some scenarios,tags are required to uniquely identify 
the MBean object. In our case we need tags for producer/consumer metrics.


Currently domain-name is not part of Metric name. We are supplying this to 
JMXReporter. Due to this we can not get MBean Name from MetricName  alone?

Can we add domainName to MetricName ^2^ object  ? or  is it a overkill?

will submit the patch with proposed changes.

1.http://www.oracle.com/technetwork/java/javase/tech/best-practices-jsp-136021.html
2.http://grepcode.com/file/repo1.maven.org/maven2/com.yammer.metrics/metrics-core/2.1.1/com/yammer/metrics/core/MetricName.java

> make the metrics name in new producer more standard
> ---------------------------------------------------
>
>                 Key: KAFKA-1723
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1723
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: clients
>    Affects Versions: 0.8.2
>            Reporter: Jun Rao
>            Assignee: Manikumar Reddy
>            Priority: Blocker
>             Fix For: 0.8.2
>
>         Attachments: KAFKA-1723.patch
>
>
> The jmx name in the new producer looks like the following:
> kafka.producer.myclientid:type=mytopic
> However, this can be ambiguous since we allow "." in client id and topic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to