-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
bugA general bugA general bugregistry: dynatraceA Dynatrace Registry related issueA Dynatrace Registry related issue
Milestone
Description
Reported by @pirgeo.
MeterRegistry implementations mapping TimeUnits to a string representation using its .toString() through this cache:
micrometer/micrometer-core/src/main/java/io/micrometer/core/instrument/MeterRegistry.java
Lines 70 to 78 in eff8a61
| private static final EnumMap<TimeUnit, String> BASE_TIME_UNIT_STRING_CACHE = Arrays.stream(TimeUnit.values()) | |
| .collect( | |
| Collectors.toMap( | |
| Function.identity(), | |
| (timeUnit) -> timeUnit.toString().toLowerCase(), | |
| (k, v) -> { throw new IllegalStateException("Duplicate keys should not exist."); }, | |
| () -> new EnumMap<>(TimeUnit.class) | |
| ) | |
| ); |
This is the standard OpenJDK representation for time units but for Dynatrace, we need UCUM-compliant units, e.g.: s instead of seconds, ms instead of milliseconds, etc.
Metadata
Metadata
Assignees
Labels
bugA general bugA general bugregistry: dynatraceA Dynatrace Registry related issueA Dynatrace Registry related issue