prometheus/model/textparse
beorn7 2ea8df4734 histogram: Expose #12305
Native histograms without a zero threshold aren't federated properly.

This adds a test to prove the specific failure mode, which is that
histograms with a zero threshold of zero are federated as classic
histograms.

The underlying reason is that the protobuf parser identifies a native
histogram by detecting a zero bucket or by detecting integer buckets.
Therefore, a float histogram with a zero threshold of zero and an
unpopulated zero bucket falls through the cracks (no integer buckets,
no zero bucket).

This commit also addse a test case for the latter.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-07-19 15:29:11 +02:00
..
interface_test.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
interface.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
openmetricslex.l
openmetricslex.l.go refactor (package model): move from github.com/pkg/errors to 'errors' and 'fmt' packages (#10747) 2022-06-27 21:29:19 +02:00
openmetricsparse_test.go Add Exemplars support for all time series 2023-03-03 17:09:17 -08:00
openmetricsparse.go Add Exemplars support for all time series 2023-03-03 17:09:17 -08:00
promlex.l refactor (package model): move from github.com/pkg/errors to 'errors' and 'fmt' packages (#10747) 2022-06-27 21:29:19 +02:00
promlex.l.go refactor (package model): move from github.com/pkg/errors to 'errors' and 'fmt' packages (#10747) 2022-06-27 21:29:19 +02:00
promparse_test.go enable gocritic, unconvert and unused linters 2023-04-13 19:20:22 +00:00
promparse.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
promtestdata.nometa.txt
promtestdata.txt
protobufparse_test.go histogram: Expose #12305 2023-07-19 15:29:11 +02:00
protobufparse.go histograms: Fix bug #12552 2023-07-12 18:47:00 +02:00
README.md

Making changes to textparse lexers

In the rare case that you need to update the textparse lexers, edit promlex.l or openmetricslex.l and then run the following command: golex -o=promlex.l.go promlex.l

Note that you need golex installed: go get -u modernc.org/golex