Skip to content

Commit

Permalink
remove unnecessary params
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fukushima <[email protected]>
  • Loading branch information
gfukushima committed Jan 15, 2025
1 parent a4e626e commit 95b2610
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ private static MetricsHistogram createMetric(
numberOfSignificantValueDigits, highestTrackableValue, customLabelsNames);
if (metricsSystem instanceof PrometheusMetricsSystem) {
final String summaryMetricName =
category.toString().toLowerCase(Locale.ROOT) + "_" + name + "_summary";
category.toString().toLowerCase(Locale.ROOT) + "_" + name ;
metricsSystem.createSummary(
category, summaryMetricName, help, () -> histogram.histogramToCollector(category, name));
category, summaryMetricName, help, histogram::histogramToCollector);
}
return histogram;
}
Expand All @@ -158,8 +158,7 @@ public void recordValue(final long value, final String... customLabelValues) {
}
}

protected ExternalSummary histogramToCollector(
final MetricCategory metricCategory, final String name) {
protected ExternalSummary histogramToCollector() {

final List<ExternalSummary.Quantile> quantiles =
histogramMap.entrySet().stream()
Expand All @@ -176,6 +175,7 @@ protected ExternalSummary histogramToCollector(
1, entry.getValue().getValueAtPercentile(100))))
.toList();

//return sum 0 as it is not supported by HdrHistogram
return new ExternalSummary(histogramMap.size(), 0, quantiles);
}
}

0 comments on commit 95b2610

Please sign in to comment.