[
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293919#comment-14293919
]
Jun Rao commented on KAFKA-1902:
--------------------------------
Thanks for the explanation. A couple of things: (1) Since tags can be topic,
partition, node, clientId, etc, it's probably useful to include the tag name in
scope. Otherwise, you don't know exactly what the value is for. For example, if
you have topic=mytopic,clientId=myclientId, using a scope of just
mytopic.myclientId, it's not clear which part is for which. (2) About using
dots, I was thinking that we can have scope like the following
scope: topic.test.partition.10
However, since topic and clientId allow dots, using the dot convention can be
confusing. For example, if you have
topic=mytopic.with.dot,clientId=myclientId.with.dot, the scope will look like
topic.mytopic.with.dot.clientId.myclientId.with.dot
It's not clear if that's the hierarchy that everybody wants. Another problem
with this convention is that it loses the info in the original tags. So, from
the scope string, you can't easily recreate the original tags and their values.
I am not sure if the dot convention is standard, but it seems it's specific to
Graphite. So, we probably don't want to use a lossy naming convention just for
the convenience of Graphite.
What if we just use the convention used in the patch, then you can customize
your Graphite reporter to report the metric name in whatever format that you
want?
Another option is to put the value part in quotes. So you will have
topic."mytopic.with.dot".clientId."myclientId.with.dot".
But that may have it's own complexity and problems.
> fix MetricName so that Yammer reporter can work correctly
> ---------------------------------------------------------
>
> Key: KAFKA-1902
> URL: https://issues.apache.org/jira/browse/KAFKA-1902
> Project: Kafka
> Issue Type: Bug
> Components: core
> Reporter: Jun Rao
> Assignee: Jun Rao
> Priority: Blocker
> Fix For: 0.8.2
>
> Attachments: kafka-1902.patch
>
>
> Currently, we create MetricName in the following format.
> group: "kafka.server"
> type: "BrokerTopicMetrics"
> name: "BytesInPerSec"
> scope: null
> mBeanName:
> "kafka.server:type=BrokerTopicMetrics,name=BytesInPerSec,topic=test"
> However, Yammer metric reporter seems to only use the first four fields
> group, type, name and scope during reporting.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)