Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Status

Current state: Under Discussion Accepted

Discussion thread: Discussionhere [Change the link from the KIP proposal email archive to your own email thread]

JIRA: KAFKA-5890 - records.lag should use tags for topic and partition rather than using metric name.

Released: 1.1.0

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

Sensors will still be removed/added on assignment change to avoid reporting metrics for partitions we are not handling anymore.

 

This will enable people to do:

Code Block
languagejava
linenumberstrue
Map<String, String> tags = new HashMap<>();
tags.put("client-id", "<client-id>")
tags.put("topic", "<topic>")
tags.put("partition", "<partition>")
consumer.metrics().get(Metrics.metricName("records-lag", "consumer-fetch-manager-metrics", tags));

rather than:

Code Block
languagejava
linenumberstrue
Map<String, String> tags = Collections.singletonMap("client-id", "<client-id>");
consumer.metrics().get(Metrics.metricName(String.format("%s.records-lag", new TopicPartition("<topic>", <partition>)), "consumer-fetch-manager-metrics", tags));

The new options is more standard with the rest of the existing metrics.

Compatibility, Deprecation, and Migration Plan

 

  • We propose to replace this old KPIs with the new ones, which will force customers that monitor them to upgrade their monitoring to leverage naming consistency. We do this as the value of the metric doesn't change.will add these new metrics and deprecate the previous ones. The old metrics will be removed once we move to 2.0 (Tracked by KAFKA-6445)

Rejected Alternatives

N/A