-
Notifications
You must be signed in to change notification settings - Fork 692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SOLR-17628: Add query quantiles metrics to prometheus endpoint #3164
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jkmuriithi for doing this!
@dsmiley maybe you can help review this and hopefully agree this is worth adding? I made this jira because I think this is important missing piece of metrics for prometheus and this PR addresses my poor implementation exporting timer (Should be a summary not a gauge average) but also adds support for creating a summary metric type.
The prometheus exporter doesn't seem to support histograms or summaries so this gets ahead of that curve.
solr/core/src/java/org/apache/solr/metrics/prometheus/core/SolrCoreHandlerMetric.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/metrics/prometheus/core/SolrCoreHandlerMetric.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/metrics/prometheus/core/SolrCoreSearcherMetric.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/metrics/prometheus/SolrPrometheusFormatter.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/metrics/prometheus/SolrPrometheusFormatter.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/metrics/prometheus/SolrPrometheusFormatter.java
Outdated
Show resolved
Hide resolved
solr/core/src/java/org/apache/solr/metrics/prometheus/core/SolrCoreHandlerMetric.java
Outdated
Show resolved
Hide resolved
Co-authored-by: David Smiley <[email protected]> Co-authored-by: Matthew Biscocho <[email protected]>
https://issues.apache.org/jira/browse/SOLR-17628
Description
Modify the implementation of
SolrPrometheusFormatter.exportTimer
to export a Prometheus summary containing quantile information instead of a single Prometheus gauge. Rename the Timer-based metricssolr_metrics_core_average_request_time
andsolr_metrics_core_average_searcher_warmup_time
to reflect this change. Remove thesolr_metrics_core_requests_time
Counter metric.Solution
Prior to this change, Dropwizard Timer metrics (used for core request handlers and searchers) were exported in Prometheus format as single gauges representing the mean of all observations. This PR replaces the existing mean gauge metrics with a summary that includes quantile metrics, the count (number) of observations, and the sum of all observations.
Sample old output:
Sample new output:
Tests
I updated
MetricsHandlerTest
andSolrPrometheusFormatterTest
to align with the changes toexportTimer
../gradlew test
passes on my local machine.Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.