[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-28 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295435#comment-14295435
 ] 

Jun Rao commented on KAFKA-1902:


It seems that the ganglia reporter replaces anything other than alpha-numeric, 
-, _ and dot to _ in the metric name. So, we can't put in chars like $ and = in 
scope. So, followed the suggestion by (1) using the dot convention; (2) 
replacing dot in tag value with _; (3) sort all tags alphabetically.

So, scope will look like
clientid.myclientid.topic.mytopic
clientid.myclientId_with_dot.topic.mytopic_with_dot

Jason, Kyle,

Could you verify the patch? Thanks,


 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, kafka-1902_2015-01-28_09:23:51.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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-28 Thread Kyle Banker (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295454#comment-14295454
 ] 

Kyle Banker commented on KAFKA-1902:


This looks great, [~junrao]!

 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, kafka-1902_2015-01-28_09:23:51.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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-28 Thread Jason Rosenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295359#comment-14295359
 ] 

Jason Rosenberg commented on KAFKA-1902:


For the record, at Square, we do use '.''s heavily in topic names (for whatever 
reason).  I don't think making graphite use configurable separators is too 
likely (or should be a dependency on this effort).

One point worth making (if not obvious), is that the ordering of tags should be 
stable (e.g. always have clientid come before topic? Or vice-versa?).


 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-28 Thread Jason Rosenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295526#comment-14295526
 ] 

Jason Rosenberg commented on KAFKA-1902:


LGTM

 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, kafka-1902_2015-01-28_09:23:51.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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-28 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295420#comment-14295420
 ] 

Jun Rao commented on KAFKA-1902:


Updated reviewboard https://reviews.apache.org/r/30321/diff/
 against branch origin/0.8.2

 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, kafka-1902_2015-01-28_09:23:51.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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294289#comment-14294289
 ] 

Jun Rao commented on KAFKA-1902:


In Kafka, topic/group/clientId can include only -, _ and dot, in addition to 
alpha numerics. The problem of replacing dot with - or _ is that looking at the 
scope string, you don't know if a - or _ is originally there or not. Some users 
may find preserving that info useful.

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jason Rosenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294287#comment-14294287
 ] 

Jason Rosenberg commented on KAFKA-1902:


Actually, a red flag here too, is why are we using 'clientId' in the metric 
name? Won't that change each time an app is restarted (or is it stable long 
term)?  If it's not stable, it should not be part of a metric name.

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jason Rosenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294261#comment-14294261
 ] 

Jason Rosenberg commented on KAFKA-1902:


[~jjkoshy] I did mean to just replace all dots with underscores.  I wasn't 
suggesting we need sub-navigation within the scope piece (although that 
wouldn't be ok too).  I really don't like the $'s though, cuz they are ugly 
to read.  The whole point is that this is human readable.  I'm ok with 
underscores potentially coexisting with 'converted' dots-to-underscores (would 
still be readable).

Do topic and clientId not allow $?  What about dashes ('-')?

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294286#comment-14294286
 ] 

Jun Rao commented on KAFKA-1902:


Is graphite the only reporter using scope? t seems that there are ganglia, cvs, 
and console reporters as well. If we use mytopic$with$dot.myclientId$with$dot, 
we lose the tag info for other reporters. Actually, even for Graphite reporter, 
preserving the tag names are probably useful. Otherwise, you are not sure 
exactly what you are navigating into (e.g., groupId, clientId and topic 
sometimes can be the same). Using 
topic.mytopic$with$dot.clientid.myclientId$with$dot would be better, but it may 
make parsing a bit harder for other types of reporters, if they make use of 
scope.

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Joel Koshy (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294239#comment-14294239
 ] 

Joel Koshy commented on KAFKA-1902:
---

I meant mytopic$with$dot.myclientId$with$dot

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Kyle Banker (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294545#comment-14294545
 ] 

Kyle Banker commented on KAFKA-1902:


[~junrao] Agree that the dot may not be common, which minimizes the problems 
with the '$'.

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294474#comment-14294474
 ] 

Jun Rao commented on KAFKA-1902:


Making the replacing character configurable is actually not very easy and I 
think it's also a bit over killing. Do you know if the dot convention is 
followed in other reporters like Ganglia?

If we do end up using the dot convention in scope name, I think we should use a 
replacing character other than - or _. The reasoning is that if you see an 
issue with a metric on a topic, you probably want to do some trouble-shooting 
on the topic. If you can't figure out the exact topic, this will be a problem. 
Yes, using $ is not very readable. However, it's probably better than not 
figuring out the exact topic name. Also, this only affects the case when dot is 
actually used in the tag value, which may not be common.


 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Joel Koshy (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294499#comment-14294499
 ] 

Joel Koshy commented on KAFKA-1902:
---

Jun - to answer your earlier question. I took a look at the GangliaReporter in 
metrics 2.x and it does seem that the ganglia reporter also uses the scope 
field. 
http://grepcode.com/file/repo1.maven.org/maven2/com.yammer.metrics/metrics-ganglia/2.0.0-BETA18/com/yammer/metrics/reporting/GangliaReporter.java#447
 So it seems that ganglia users should also be affected by this issue that 
Jason reported

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jason Rosenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294332#comment-14294332
 ] 

Jason Rosenberg commented on KAFKA-1902:


+1

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Otis Gospodnetic (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14294733#comment-14294733
 ] 

Otis Gospodnetic commented on KAFKA-1902:
-

bq. It's unfortunate it seems graphite does not allow overriding the separator 
for hierarchy.

Maybe that should be a feature request for Graphite devs?

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jun Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14293747#comment-14293747
 ] 

Jun Rao commented on KAFKA-1902:


Created reviewboard https://reviews.apache.org/r/30321/diff/
 against branch origin/0.8.2

 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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Jason Rosenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14293840#comment-14293840
 ] 

Jason Rosenberg commented on KAFKA-1902:


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)


[jira] [Commented] (KAFKA-1902) fix MetricName so that Yammer reporter can work correctly

2015-01-27 Thread Kyle Banker (JIRA)

[ 
https://issues.apache.org/jira/browse/KAFKA-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14293854#comment-14293854
 ] 

Kyle Banker commented on KAFKA-1902:


This definitely fixes the issue. I'm now seeing all of the missing metrics, and 
if you go with this approach, we Graphite users should be fine.

There are a couple of aesthetic issues we might consider, though, given that 
the Graphite convention is to use dot-separated names to form a hierarchy.

1. Do we want topics under BrokerTopicMetrics to be indicated as topic=foo or 
would it be better to set the scope as Topics.foo to form a more natural 
Graphite hierarchy?
2. FetcherLagMetrics now show up as 
clientId=ReplicaFetcherThread-0-2,topic=foo,partition=0.
Alternative: ReplicaFetcherThread-0-2.Topics.foo.partition-0
3. Log metrics look like this: topic=foo,partition=1. A Graphite alternative 
would be: Topics.foo.partition1, Topics.foo.partition2, etc.

Overall, these metrics naming conventions skew toward the JMX standard. We can 
pretty easily work around that in the Graphite world, and keeping the format 
the same will probably make it easier to compare metrics across systems.

Either way, it will be a big change for those using Graphite.

 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)