-
Notifications
You must be signed in to change notification settings - Fork 834
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
Prometheus endpoint sending invalid type for Histograms #740
Comments
We are using micrometer (see here and here) with the configuration: seldon-core/engine/src/main/resources/application.properties Lines 6 to 7 in 559f897
What version of Prometheus are you using? We have had no issues with these metrics in our analytics helm chart using Prometheus and Grafana. Can you post the error from which component you are seeing? |
Hello Clive, Thank you for your response. |
Hello, The previous Micromenter issue micrometer-metrics/micrometer#562 includes the explanation of the difference between Micromenter Histogram Metric and Prometheus Histogram- and Summary Metric Type. If an application wants to be compliant with the Prometheus Metric Type definition, it has to define a timed metric with the method 'publishPercentilesHistogram(true)' for the histogram metric. And it needs to create a separate time metric object with the method 'publishPercentiles(0.5, 0.75, 0.95, 0.98, 0.99)' for the summary metric. |
This is our setup at present: seldon-core/engine/src/main/resources/application.properties Lines 4 to 8 in 58927fa
Happy to discuss how this can be changed. |
Your Grafana dashboard file predictions-analytics-dashboard.json uses the function histogram_quantile (e. g. below) to calculate the quantile from the buckets on the server-side. So the application setting 'management.metrics.distribution.percentiles.all=0.5, 0.75, 0.95, 0.98, 0.99' is not needed, which creates quantiles on the application side.
"expr": "histogram_quantile(0.99, sum(rate(seldon_api_engine_client_requests_seconds_bucket{uri=\"/predict\",model_image=~\"$model_image\",predictor_name=~\"$predictor\",predictor_version=~\"$version\",model_name=~\"$model_name\",model_version=~\"$model_version\"}[20s])) by (predictor_name,predictor_version,model_name,model_image,model_version,le))",
If you want to use Prometheus Histogram and Summary metric types in your dashboards you would have to create two separate timed metrics in your application source code. At the moment, this cannot be achieved by using simply application property settings. |
Are you saying micrometer does not allow for what you need. Are you able to suggest the correct config for sping/micrometer? |
The configuration without the line 'management.metrics.distribution.percentiles.all=0.5, 0.75, 0.95, 0.98, 0.99' is working for us. I also looked at your Grafan dashboard code, and it is using the function histogram_quantile. So removing the configuration setting 'management.metrics.distribution.percentiles.all=0.5, 0.75, 0.95, 0.98, 0.99' should not break your dashboards. |
We are moving to Go replacement. Will be available in 1.1 |
Please reopen if an issue in Go executor @markusgay |
I also find this a bit confusing. Do I understand correctly that in principle, those quantile lines (with |
For record of type
Histogram
the Prometheus endpoint sendsquantiles
which is not a supported type forHistogram
. It seems as if the Seldon Prometheus server is throwing these records away, but our DataDog implementation is trying to make sense of these records and results in broken reports.here is a log snippet:
The first five are Histograms but having a type of quantile.
According to the documentation,
Histogram
only supports three types andquantiles
is not one of them:https://prometheus.io/docs/concepts/metric_types/#histogram
The text was updated successfully, but these errors were encountered: