You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Status

Current state: Under Discussion

Discussion thread: here

JIRA: here

Motivation

At present, it is impossible to perceive the Kafka version that the broker is running from the perspective of metrics. If multiple Kafka versions are deployed in a cluster due to various reasons, it is difficult for us to intuitively understand the version distribution.

So, I want to add a kafka version metric indicating the version of the current running kafka server, it can help us to perceive the mixed distribution of multiple versions, and to perceive the progress of version upgrade in the cluster in real time.

Public Interfaces

  • add a kafka version metric for per broker: kafka.server:type=KafkaServer/BrokerServer,name=KafkaVersion
    • description: A gauge metric, the value is constant `1`.
    • tags: `Map("version" => VersionInfo.getVersion)`

Proposed Changes

When instantiating kafkaServer/BrokerServer, register `KafkaVersion` gauge metric, whose value is 1, its tag key is "version", its tag value is obtained by `VersionInfo.getVersion`. And remove all related metrics when kafkaServer/BrokerServer shutdown.

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