diff --git a/implementations/micrometer-registry-prometheus/src/test/java/io/micrometer/prometheusmetrics/PrometheusMeterRegistryTest.java b/implementations/micrometer-registry-prometheus/src/test/java/io/micrometer/prometheusmetrics/PrometheusMeterRegistryTest.java index ebb6bd26cf..860712e4f3 100644 --- a/implementations/micrometer-registry-prometheus/src/test/java/io/micrometer/prometheusmetrics/PrometheusMeterRegistryTest.java +++ b/implementations/micrometer-registry-prometheus/src/test/java/io/micrometer/prometheusmetrics/PrometheusMeterRegistryTest.java @@ -1016,6 +1016,12 @@ void doesNotCallConventionOnScrape() { assertThat(convention.tagKeyCount.get()).isEqualTo(expectedTagKeyCount); } + @Test + void scrapeWhenMeterNameContainsSingleCharacter() { + registry.counter("c").increment(); + assertThatNoException().isThrownBy(() -> registry.scrape()); + } + private static class CountingPrometheusNamingConvention extends PrometheusNamingConvention { AtomicInteger nameCount = new AtomicInteger();