diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/HistogramGauges.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/HistogramGauges.java index 242661852b..0ab675d340 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/HistogramGauges.java +++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/distribution/HistogramGauges.java @@ -116,7 +116,7 @@ private HistogramGauges(HistogramSupport meter, MeterRegistry registry, ToDoubleFunction percentileValueFunction = m -> { snapshotIfNecessary(); polledGaugesLatch.countDown(); - return percentileValue.apply(snapshot.percentileValues()[index]); + return percentileValue.apply(valueAtPercentiles[index]); }; Gauge.builder(percentileName.apply(valueAtPercentiles[i]), meter, percentileValueFunction)