Skip to content

Commit

Permalink
Fix percentiles gauges in Dropwizard-based implementations (fixes #331)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkschneider committed Jan 5, 2018
1 parent d477d06 commit 1b41f8b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected io.micrometer.core.instrument.DistributionSummary newDistributionSumma

for (double percentile : histogramConfig.getPercentiles()) {
gauge(id.getName(), Tags.concat(getConventionTags(id), "percentile", percentileFormat.format(percentile)),
percentile, summary::percentile);
summary, s -> s.percentile(percentile));
}

return summary;
Expand All @@ -133,7 +133,7 @@ protected Timer newTimer(Meter.Id id, HistogramConfig histogramConfig, PauseDete

for (double percentile : histogramConfig.getPercentiles()) {
gauge(id.getName(), Tags.concat(getConventionTags(id), "percentile", percentileFormat.format(percentile)),
percentile, p -> timer.percentile(p, TimeUnit.SECONDS));
timer, t -> t.percentile(percentile, TimeUnit.SECONDS));
}

return timer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ protected Timer newTimer(Meter.Id id, HistogramConfig histogramConfig, PauseDete

for (double percentile : histogramConfig.getPercentiles()) {
gauge(id.getName(), Tags.concat(getConventionTags(id), "percentile", percentileFormat.format(percentile)),
percentile, p -> timer.percentile(p, getBaseTimeUnit()));
timer, t -> t.percentile(percentile, getBaseTimeUnit()));
}

if (histogramConfig.isPublishingHistogram()) {
Expand All @@ -97,7 +97,7 @@ protected DistributionSummary newDistributionSummary(Meter.Id id, HistogramConfi

for (double percentile : histogramConfig.getPercentiles()) {
gauge(id.getName(), Tags.concat(getConventionTags(id), "percentile", percentileFormat.format(percentile)),
percentile, summary::percentile);
summary, s -> summary.percentile(percentile));
}

if (histogramConfig.isPublishingHistogram()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected DistributionSummary newDistributionSummary(Meter.Id id, HistogramConfi

for (double percentile : histogramConfig.getPercentiles()) {
gauge(id.getName(), Tags.concat(getConventionTags(id), "percentile", percentileFormat.format(percentile)),
percentile, summary::percentile);
summary, s -> summary.percentile(percentile));
}

if(histogramConfig.isPublishingHistogram()) {
Expand Down Expand Up @@ -106,7 +106,7 @@ protected Timer newTimer(Meter.Id id, HistogramConfig histogramConfig, PauseDete

for (double percentile : histogramConfig.getPercentiles()) {
gauge(id.getName(), Tags.concat(getConventionTags(id), "percentile", percentileFormat.format(percentile)),
percentile, p -> timer.percentile(p, getBaseTimeUnit()));
timer, t -> t.percentile(percentile, getBaseTimeUnit()));
}

if(histogramConfig.isPublishingHistogram()) {
Expand Down

0 comments on commit 1b41f8b

Please sign in to comment.