public <T> void addValueMetric(MetricNameTemplate nameTemplate, final LiteralSupplier<T> supplier) {
            MetricName metricName = metricName(nameTemplate);
            metrics().addMetricIfAbsent(metricName, null, (Gauge<T>) (config, now) -> supplier.metricValue(now));
        }
Add to this group an indicator metric with a function that returns the current value.

@param nameTemplate the name template for the metric; may not be null
@param supplier     the function used to determine the literal value of the metric; may not be null
@throws IllegalArgumentException if the name is not valid
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/ConnectMetrics.java