You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "lambdaliu (JIRA)" <ji...@apache.org> on 2018/12/14 01:02:00 UTC

[jira] [Assigned] (KAFKA-7734) Metrics tags should use LinkedHashMap to guarantee ordering

     [ https://issues.apache.org/jira/browse/KAFKA-7734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

lambdaliu reassigned KAFKA-7734:
--------------------------------

    Assignee: lambdaliu

> Metrics tags should use LinkedHashMap to guarantee ordering
> -----------------------------------------------------------
>
>                 Key: KAFKA-7734
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7734
>             Project: Kafka
>          Issue Type: Improvement
>          Components: metrics
>            Reporter: Guozhang Wang
>            Assignee: lambdaliu
>            Priority: Major
>
> Today we store metrics tags inside MetricName from various places, and many of them are using `HashMap`. However, for metrics reporters like JMXReporter, the mBeanName is constructed by looping over `metricName.tags().entrySet()` which does not guarantee ordering. This resulted a few places where the mBeanName string not as expected, e.g. we document the Streams cache metrics as 
> {code}
> kafka.streams:type=stream-record-cache-metrics,client-id=([-.\w]+),task-id=([-.\w]+),record-cache-id=([-.\w]+)
> {code}
> However, what I've seen from JMXReporter is, for example:
> {code}
> kafka.streams:type=stream-record-cache-metrics,record-cache-id=all,client-id=streams-saak-test-client-StreamThread-1,task-id=1_3
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)