prometheus/scrape
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 Re-generate test cert to fix test_windows test failures 2022-03-17 19:37:18 +01:00
clientprotobuf.go Update according to code review 2023-05-05 02:33:00 +08:00
helpers_test.go Support FloatHistogram in TSDB (#11522) 2022-12-28 14:25:07 +05:30
manager.go style: Replace else if cascades with switch 2023-04-19 17:22:31 +02:00
manager_test.go Merge pull request #12048 from bboreham/faster-targets 2023-03-09 11:10:01 +00:00
scrape.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
scrape_test.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
target.go Treat bucket limit like sample limit and make it fail the whole scrape and return an error 2023-04-22 03:25:07 +08:00
target_test.go Add tests according to code review 2023-04-25 02:07:36 +08:00