You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Vladimir Tretyakov (JIRA)" <ji...@apache.org> on 2015/01/07 09:25:35 UTC

[jira] [Comment Edited] (KAFKA-1723) make the metrics name in new producer more standard

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

Vladimir Tretyakov edited comment on KAFKA-1723 at 1/7/15 8:25 AM:
-------------------------------------------------------------------

Hi, thx for patch, one question from me, in patch I see something like that:
{code}
+                Map<String, String> tags = new LinkedHashMap<String, String>();
+                tags.put("clientId", clientId);
+                tags.put("topic", topic);
+

-                topicRecordCount.add("topic." + topic + ".record-send-rate", new Rate());
+                topicRecordCount.add("topic." + topic + ".record-send-rate", "ProducerTopicMetrics", tags, new Rate());

{code}
Note that "("topic." + topic + ".record-send-rate"" part and tags both contain "topic".
Can we avoid duplication and use in all places something like:
{code}
topicRecordCount.add("record-send-rate", "ProducerTopicMetrics", tags, new Rate());
{code}
?
Thx.



was (Author: vladimir.tretyakov):
Hi, thx for patch, one question from me, in patch I see something like that:
{code}
+                Map<String, String> tags = new LinkedHashMap<String, String>();
+                tags.put("clientId", clientId);
+                tags.put("topic", topic);
+

-                topicRecordCount.add("topic." + topic + ".record-send-rate", new Rate());
+                topicRecordCount.add("topic." + topic + ".record-send-rate", "ProducerTopicMetrics", tags, new Rate());

{code}
Note that "("topic." + topic + ".record-send-rate"" part and tags both contain "topic".
Can we avoid duplication and use in all places something like:
topicRecordCount.add("record-send-rate", "ProducerTopicMetrics", tags, new Rate());
?
Thx.


> 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)