Current state: Under Discussion

Discussion thread: here

JIRA: here


At present, it is impossible to perceive the Kafka version that the broker is running from the perspective of metrics. If multiple Kafka versions(not only kafka server, yet other clients, such as producer client, consumer client and so on.) are deployed in a cluster due to various reasons, it is difficult for us to intuitively understand the version distribution.

Although there is currently a metric: kafka.server:type=app-info, which can expose `Version` and `CommitId`, but because they are both string types, the version cannot be collected for monitoring and collection services such as Prometheus. . Therefore, this KIP will add `version` and commitId` to the existing metric: `start-time-ms` in the form of tags. Since the value of `start-time-ms` is of numeric type, Prometheus can collect this metric and obtain the values ​​of version and commitId in the form of parsed tags.

Public Interfaces

  • add tags for existed metric: `kafka.server:type=app-info`, its form is below:
    • OBJECT_NAME    kafka.server:type=app-info,version=3.7.0-SNAPSHOT,commitId=362f7ab130e3ea24
       NAME           VALUE
       start-time-ms  1697793322366

Proposed Changes

Add tags for existed metric: `kafka.server:type=app-info`, and obtain the values ​​of version and commitId in the form of parsed tags from collected data from prometheus.

Compatibility, Deprecation, and Migration Plan

The new metric added to this kip will not have any impact on the existing behavior.

Test Plan

Rejected Alternatives

Existed metric about version: kafka.server:type=app-info, but its value is not numeric, can not be obtained by prometheus.

  • No labels