brandboat commented on code in PR #16618:
URL: https://github.com/apache/kafka/pull/16618#discussion_r1684578678
##########
server-common/src/main/java/org/apache/kafka/server/metrics/KafkaMetricsGroup.java:
##########
@@ -70,16 +71,26 @@ public static MetricName explicitMetricName(String group,
String typeName,
return new MetricName(group, typeName, name, scope,
nameBuilder.toString());
}
- public final <T> Gauge<T> newGauge(String name, Gauge<T> metric,
Map<String, String> tags) {
- return KafkaYammerMetrics.defaultRegistry().newGauge(metricName(name,
tags), metric);
+ public <T> Gauge<T> newGauge(String name, Supplier<T> metric, Map<String,
String> tags) {
+ return KafkaYammerMetrics.defaultRegistry().newGauge(metricName(name,
tags), new Gauge<T>() {
Review Comment:
Oops.
--
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]