code: private static String getPrometheusMetricName(String name) {
  
          String out = name.replaceAll("(?<!^|:)(\\p{Upper})(?=\\p{Lower})", "_$1");
          out = out.replaceAll("(?<=\\p{Lower})(\\p{Upper})", "_$1").toLowerCase();
          out = out.replaceAll("[-_.\\s]+", "_");
          out = out.replaceAll("^_*(.*?)_*$", "$1");
  
          return out;
      }
docs: /*
  Create the Prometheus metric name by sanitizing some characters