prometheus/model/textparse
beorn7 da047c6857 histograms: Fix bug #12552
The problem was the following:

When trying to parse native histograms and classic histograms in
parallel, the parser would first parse the histogram proto messages as
a native histogram and then parse the same message again, but now as a
classic histogram. Afterwards, it would forget that it was dealing
with a metric family that contains native histograms and would parse
the rest of the metric family as classic histograms only. The fix is
to check again after being done with a classic histogram.

Signed-off-by: beorn7 <beorn@grafana.com>
2023-07-12 18:47:00 +02:00
..
README.md
interface.go textparse/scrape: Add option to scrape both classic and native histograms 2023-05-13 01:32:25 +02:00
interface_test.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.go Add Exemplars support for all time series 2023-03-03 17:09:17 -08:00
openmetricsparse_test.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.go lint: Adjust to the lint warnings raised by current versions of golint-ci 2023-04-19 17:10:10 +02:00
promparse_test.go enable gocritic, unconvert and unused linters 2023-04-13 19:20:22 +00:00
promtestdata.nometa.txt
promtestdata.txt
protobufparse.go histograms: Fix bug #12552 2023-07-12 18:47:00 +02:00
protobufparse_test.go histograms: Modify test to expose bug #12552 2023-07-12 18:17:35 +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