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

Compare with Current View Page History

Version 1 Next »

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.RemoteStorageThreadPool 
  • org.apache.kafka.server.log.remote.storage.RemoteStorageMetrics 

Proposed Changes

Rename the following metrics

  • org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderTaskQueueSize
  • org.apache.kafka.storage.internals.log:type=RemoteStorageThreadPool.RemoteLogReaderAvgIdlePercent

This change will impact external monitoring systems that rely on this metric, and corresponding modifications will be needed to support the new name.

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.RemoteLogReaderAvgIdlePercent and `org.apache.kafka.storage.internals.log: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

We should add new test for new metrics works expected as deprecated test.

Rejected Alternatives

n/a

  • No labels