public MetricName metricName(String name, Map<String, String> tags) {
        String pkg = klass.getPackage() == null ? "" : klass.getPackage().getName();
        String simpleName = klass.getSimpleName().replaceAll("\\$$", "");
        return explicitMetricName(pkg, simpleName, name, tags);
    }
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