in geronimo-metrics-common/src/main/java/org/apache/geronimo/microprofile/metrics/common/prometheus/PrometheusFormatter.java [65:76]
public PrometheusFormatter() {
validUnits = Stream.of(MetricUnits.class.getDeclaredFields())
.filter(f -> !"NONE".equals(f.getName()) && Modifier.isStatic(f.getModifiers()) && Modifier.isPublic(f.getModifiers()) && String.class == f.getType())
.map(f -> {
try {
return f.get(null);
} catch (final IllegalAccessException e) {
throw new IllegalStateException(e);
}
})
.collect(toSet());
}