DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
Status
Current state: "Under Discussion"
Discussion thread: here
JIRA: here
Motivation
The metrics were originally named using the `kafka.<COMPONENT>` format. However, an unexpected name was introduced during the initialization of a metric in this patch.
Subsequent developers were unaware of this change and began using the new package-based naming as the metricName. In reality, the correct convention should adhere to the original kafka.<COMPONENT> format.
This KIP proposes to standardize Kafka metric naming by updating the `org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool` metric to follow the consistent kafka.<COMPONENT> naming convention used across other Kafka metrics.
Public Interfaces
org.apache.kafka.storage.internals.log.RemoteStorageThreadPoolorg.apache.kafka.server.log.remote.storage.RemoteStorageMetrics
Proposed Changes
Introduce a new metric: kafka.server:type=AssignmentsManager, consistent with other Kafka metrics.
This change will impact external monitoring systems that rely on the old metric name; corresponding updates will be required.
Deprecate the following metrics
- org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderTaskQueueSize
- org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderAvgIdlePercent
Introduce following new metric:
- kafka.log.remote:type=RemoteStorageThreadPool.RemoteLogReaderAvgIdlePercent
- kafka.log.remote:type=RemoteStorageThreadPool.RemoteLogReaderTaskQueueSize
This change will impact external monitoring systems that rely on the old metric name; corresponding updates will be required.
Compatibility, Deprecation, and Migration Plan
- We will add a deprecated annotation on `RemoteStorageMetrics#REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC` and `RemoteStorageMetrics#REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC`
- Update the Kafka documentation to note MBean will be replaced
- org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderTaskQueueSize
- org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderAvgIdlePercent
- Register new metrics `kafka.log.remote:type=RemoteStorageThreadPool.RemoteLogReaderTaskQueueSize` and `kafka.log.remote:type=RemoteStorageThreadPool.RemoteLogReaderAvgIdlePercent` into `RemoteStorageThreadPool#metricsGroup`
- Delete `RemoteStorageMetrics#REMOTE_LOG_READER_TASK_QUEUE_SIZE_METRIC` and `RemoteStorageMetrics#REMOTE_LOG_READER_AVG_IDLE_PERCENT_METRIC all usage in code base.
Test Plan
- Add new tests to verify the new metric is correctly registered and behaves as expected.
- Ensure backward compatibility by verifying deprecated metric behavior until removal.
Rejected Alternatives
n/a