majialoong commented on code in PR #20543:
URL: https://github.com/apache/kafka/pull/20543#discussion_r2366324828
##########
clients/src/main/java/org/apache/kafka/common/metrics/Gauge.java:
##########
@@ -20,13 +20,4 @@
* A gauge metric is an instantaneous reading of a particular value.
*/
@FunctionalInterface
-public interface Gauge<T> extends MetricValueProvider<T> {
-
- /**
- * Returns the current value associated with this gauge.
- * @param config The configuration for this metric
- * @param now The POSIX time in milliseconds the measurement is being taken
- */
- T value(MetricConfig config, long now);
-
-}
+public interface Gauge<T> extends MetricValueProvider<T> { }
Review Comment:
Keeping the Gauge type can improves code readability. Readers immediately
understand that the monitoring metric represents an instantaneous value, and it
can also be equated with the concept of Gauge in mainstream monitoring systems.
Directly using the MetricValueProvider may be a bit too abstract.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]