-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Description
What did you do?
CNCF slack discussion: https://cloud-native.slack.com/archives/C02KR205UMU/p1728397164955929
Expect exemplars for counters/histograms/summaries on first scrape when --enable-feature=exemplar-storage,created-timestamp-zero-ingestion.
I was adding a unit test for NHCB (#14978) and noticed that after calling OpenMetricsParser.CreatedTimestamp , the parser doesn't return exemplars.
This is because when the parser first encounter a metric, it will peek ahead to get the created timestamp here: Next. However Next starts by clearing any exemplars already processed on the series line .
To reproduce the issue, flip the order of exemplars and ct in the test framework:
prometheus/model/textparse/interface_test.go
Line 175 in 02d0de9
| for e := (exemplar.Exemplar{}); p.Exemplar(&e); { |
What did you expect to see?
Expect exemplars for counters/histograms/summaries on first scrape when --enable-feature=exemplar-storage,created-timestamp-zero-ingestion.
What did you see instead? Under which circumstances?
Unit test simulating the first scrape fails. To reproduce the issue, flip the order of exemplars and ct in the test framework:
prometheus/model/textparse/interface_test.go
Line 175 in 02d0de9
| for e := (exemplar.Exemplar{}); p.Exemplar(&e); { |
System information
No response
Prometheus version
No response
Prometheus configuration file
N/AAlertmanager version
No response
Alertmanager configuration file
No response
Logs
No response