private static Map<String, String> cleanTags(Map<String, String> raw) {
        return raw.entrySet()
            .stream()
            .collect(Collectors.toMap(s -> clean(s.getKey(), TAG_JOINER), Entry::getValue));
    }
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