conduktor.io ↗

KIP-1019 — Expose method to determine Metric Measurability

Accepted Kafka 3.8 Metrics

Adds a public `isMeasurable()` method to the `KafkaMetric` interface so callers can check measurability without relying on exception handling or Java reflection. Existing code either caught `ClassCastException` from `metric.measurableValue()` or used reflection to inspect the internal value provider, both of which are fragile and expensive.

Details

AuthorApoorv Mittal
StatusAccepted
Kafka Version3.8
JIRAKAFKA-16280
WikiView on Apache Wiki
Created2024-02-14
Last Modified2024-04-19
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.