public <T> Gauge<T> newGauge(MetricName name, Supplier<T> metric) {
        return KafkaYammerMetrics.defaultRegistry().newGauge(name, new Gauge<T>() {
            @Override
            public T value() {
                return metric.get();
            }
        });
    }
Creates a new MetricName object for gauges, meters, etc. created for this
metrics group.
@param name Descriptive name of the metric.
@param tags Additional attributes which mBean will have.
@return Sanitized metric name object.
server-common/src/main/java/org/apache/kafka/server/metrics/KafkaMetricsGroup.java