[
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14293840#comment-14293840
]
Jason Rosenberg edited comment on KAFKA-1902 at 1/27/15 5:30 PM:
-----------------------------------------------------------------
In the yammer metric reporter (which is based on the Graphite metric naming
scheme:
https://graphite.readthedocs.org/en/latest/render_api.html#graphing-metrics),
it's assumed that the metric name is comprised of components separated by dots,
e.g. part1.part2.part3.part4. These components make up branches in the
navigation tree typically presented in a ui, etc.
No spaces are allowed (the yammer metric reporter replaces spaces with dashes
'-'). But other characters are allowed, including '='.
The yammer metric name is a concatenation of the group, type, name, scope (with
'.'s inserted between each). But if any of these also have a '.' internal to
them, then that will also result in a separate component, so if we have:
{code}
group: "kafka.server"
type: "BrokerTopicMetrics"
name: "BytesInPerSec"
scope: topic=my.topic.with.dots,partition=2
{code}
This will result in the metric path (broken down by navigation components):
{code}
kafka
server
BrokerTopicMetrics
BytesInPerSec
topic=my
topic
with
dots,partitions=
2
{code}
Thus, I don't think the inclusion of '=' and ',' really maps well here, if the
kafka topic has dots in it. Instead, I think it would be better to just have
the scope be something like:
{code}
scope: topicname.partition
{code}
(e.g. scope: my.topic.with.dots.2 in the example above).
The bottom line is that jmx tag syntax doesn't necessarily map directly to a
metric navigation path.
was (Author: [email protected]):
In the yammer metric reporter (which is based on the Graphite metric naming
scheme:
https://graphite.readthedocs.org/en/latest/render_api.html#graphing-metrics),
it's assumed that the metric name is comprised of components separated by dots,
e.g. part1.part2.part3.part4. These components make up branches in the
navigation tree typically presented in a ui, etc.
No spaces are allowed (the yammer metric reporter replaces spaces with dashes
'-'). But other characters are allowed, including '='.
The yammer metric name is a concatenation of the group, type, name, scope (with
'.'s inserted between each). But if any of these also have a '.' internal to
them, then that will also result in a separate component, so if we have:
group: "kafka.server"
type: "BrokerTopicMetrics"
name: "BytesInPerSec"
scope: topic=my.topic.with.dots,partition=2
This will result in the metric path (broken down by navigation components):
kafka
server
BrokerTopicMetrics
BytesInPerSec
topic=my
topic
with
dots,partitions=
2
Thus, I don't think the inclusion of '=' and ',' really maps well here, if the
kafka topic has dots in it. Instead, I think it would be better to just have
the scope be something like:
scope: topicname.partition (e.g. scope: my.topic.with.dots.2 in the example
above).
> 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)