docs: Correct and clarify histogram bucket and resolution limits

Previously, the config doc suggested that scrapes are simply failed if
the bucket limit is exceeded. However, instead Prometheus first
attempts to reduce the resolution. This will succeed in almost all
non-pathological cases. However, in the rare case that it doesn't, the
scrape will be failed after all.

For the resolution limit AKA `native_histogram_min_bucket_factor`, the
logic is a bit different. Once the highest factor, i.e. schema -4, is
reached, the scrape will still succeed.

Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
beorn7 2024-07-18 12:30:55 +02:00
parent b75e635374
commit a6fa8a471c
1 changed files with 5 additions and 3 deletions

View File

@ -458,13 +458,15 @@ metric_relabel_configs:
[ keep_dropped_targets: <int> | default = 0 ] [ keep_dropped_targets: <int> | default = 0 ]
# Limit on total number of positive and negative buckets allowed in a single # Limit on total number of positive and negative buckets allowed in a single
# native histogram. If this is exceeded, the entire scrape will be treated as # native histogram. The resolution of a histogram with more buckets will be
# failed. 0 means no limit. # reduced until the number of buckets is within the limit. If the limit cannot
# be reached, the scrape will fail.
# 0 means no limit.
[ native_histogram_bucket_limit: <int> | default = 0 ] [ native_histogram_bucket_limit: <int> | default = 0 ]
# Lower limit for the growth factor of one bucket to the next in each native # Lower limit for the growth factor of one bucket to the next in each native
# histogram. The resolution of a histogram with a lower growth factor will be # histogram. The resolution of a histogram with a lower growth factor will be
# reduced until it is within the limit. # reduced as much as possible until it is within the limit.
# To set an upper limit for the schema (equivalent to "scale" in OTel's # To set an upper limit for the schema (equivalent to "scale" in OTel's
# exponential histograms), use the following factor limits: # exponential histograms), use the following factor limits:
# #