From a6fa8a471c58b4c3dc2027bcd03bdf42cd9bdb49 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 18 Jul 2024 12:30:55 +0200 Subject: [PATCH] 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 --- docs/configuration/configuration.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 35976871b..ff24082e4 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -458,13 +458,15 @@ metric_relabel_configs: [ keep_dropped_targets: | default = 0 ] # 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 -# failed. 0 means no limit. +# native histogram. The resolution of a histogram with more buckets will be +# 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: | default = 0 ] # 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 -# 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 # exponential histograms), use the following factor limits: #