private static String clean(String raw, String joiner) {
        Objects.requireNonNull(raw, "metric data cannot be null");
        String lowerCase = raw.toLowerCase(Locale.ROOT);
        return lowerCase.replaceAll("-", joiner);
    }
Converts a tag name to match the telemetry naming conventions by converting into snake_case.
<p>
Kafka metrics have tags name in lower case separated by hyphens. Eg: total-errors

@param raw the input map
@return the new map with keys replaced by snake_case representations.
clients/src/main/java/org/apache/kafka/common/telemetry/internals/TelemetryMetricNamingConvention.java