prometheus/config
beorn7 9e500345f3 textparse/scrape: Add option to scrape both classic and native histograms
So far, if a target exposes a histogram with both classic and native
buckets, a native-histogram enabled Prometheus would ignore the
classic buckets. With the new scrape config option
`scrape_classic_histograms` set, both buckets will be ingested,
creating all the series of a classic histogram in parallel to the
native histogram series. For example, a histogram `foo` would create a
native histogram series `foo` and classic series called `foo_sum`,
`foo_count`, and `foo_bucket`.

This feature can be used in a migration strategy from classic to
native histograms, where it is desired to have a transition period
during which both native and classic histograms are present.

Note that two bugs in classic histogram parsing were found and fixed
as a byproduct of testing the new feature:

1. Series created from classic _gauge_ histograms didn't get the
   _sum/_count/_bucket prefix set.
2. Values of classic _float_ histograms weren't parsed properly.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-05-13 01:32:25 +02:00
..
testdata Add include scrape configs 2023-03-06 23:35:39 +01:00
config_default_test.go Add new Go build tags. 2021-08-27 10:24:14 +02:00
config_test.go Add include scrape configs 2023-03-06 23:35:39 +01:00
config_windows_test.go Invert service discovery dependencies (#7701) 2020-08-20 13:48:26 +01:00
config.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00