Home  >  Article  >  Backend Development  >  Prometheus summary quantile error

Prometheus summary quantile error

WBOY
WBOYforward
2024-02-09 09:39:09627browse

Prometheus 摘要分位数错误

Prometheus is a powerful open source monitoring system that is widely used in the cloud native field. However, recently, some users encountered a problem called "summary quantile error" when using Prometheus for indicator statistics. This problem will lead to errors in the calculation results of indicator data, causing trouble for users in monitoring data analysis. In this article, PHP editor Youzi will analyze this problem in detail and provide solutions to help users quickly solve this problem.

Question content

I want to create Prometheus Summary in golang service. And set the quantile there. Quantile sets up my quantile rank plot and corresponding absolute error. ie. (from example)

map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001}

I want to add 0.25 quantiles. What error value is correct?

Workaround

As I understand it, you only want to add the 0.25 quantile to your target:

Objectives: map[float64]float64{0.25: 0.01, 0.5: 0.05, 0.9: 0.01, 0.99: 0.001},

Since this is a statistical approximation with error, there is no strict formula for finding the optimal error value. This is a trade-off between accuracy and performance (of query calculations). 0.001, 0.01, 0.05, etc. are common, but you need to consider your data distribution (skew, normal, etc.), client performance costs, use cases, SLOs, etc. Maybe you need to spiral to get your best.

The above is the detailed content of Prometheus summary quantile error. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete