prometheus/promql
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
..
fuzz-data
parser Merge branch 'main' into linter/nilerr 2023-04-19 19:56:39 +02:00
testdata Adds day_of_year function to PromQL 2022-05-20 14:08:34 +02:00
bench_test.go Merge branch 'main' into linter/nilerr 2023-04-19 19:56:39 +02:00
engine.go Make MemoizedSeriesIterator not implement chunkenc.Iterator 2023-05-03 12:45:39 -07:00
engine_test.go Merge branch 'main' into linter/nilerr 2023-04-19 19:56:39 +02:00
functions.go Merge branch 'main' into linter/nilerr 2023-04-19 19:56:39 +02:00
functions_test.go Merge branch 'main' into linter/nilerr 2023-04-19 19:56:39 +02:00
fuzz.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
fuzz_test.go error for invalid media type should not be completely swallowed (#10186) 2022-02-08 10:57:56 +01:00
promql_test.go add ctx to QueryEngine interface 2023-04-17 21:32:38 -07:00
quantile.go style: Replace `else if` cascades with `switch` 2023-04-19 17:22:31 +02:00
query_logger.go Close file descriptor in query logging (#11148) 2022-08-17 15:27:27 +05:30
query_logger_test.go refactor: move from io/ioutil to io and os packages (#10528) 2022-04-27 11:24:36 +02:00
test.go add ctx to QueryEngine interface 2023-04-17 21:32:38 -07:00
test_test.go promql: Separate `Point` into `FPoint` and `HPoint` 2023-04-13 19:25:16 +02:00
value.go promql: Separate `Point` into `FPoint` and `HPoint` 2023-04-13 19:25:16 +02:00
value_test.go Shortcut `ContainsSameLabelset()` (#11000) 2022-07-13 15:18:10 +05:30