private static MetricName getMetricName(String type, String name) {
        return KafkaYammerMetrics.getMetricName("kafka.server", type, name);
    }
Create a new LoaderMetrics object.

@param registry  The metrics registry, or Optional.empty if this is a test and we don't have one.
metadata/src/main/java/org/apache/kafka/image/publisher/metrics/SnapshotEmitterMetrics.java