feat(nhcb): implement created timestamp handling#15198
Conversation
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Call through to the underlaying parser if we are not in a histogram and the entry is a series or exponential native histogram. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Fixes: #15137 Ignore exemplars while peeking ahead during CT parsing. Simplify state reset with defer(). Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
| if ct := p.CreatedTimestamp(); ct != nil { | ||
| got.ct = int64p(*ct) | ||
| } | ||
| for e := (exemplar.Exemplar{}); p.Exemplar(&e); { |
There was a problem hiding this comment.
Note to reviewers: this reordering is done to trigger #15137. And also means the tests use the same order that scrape.go actually does things.
|
Improved OM parser performance due to not fully parsing exemplars twice. |
bwplotka
left a comment
There was a problem hiding this comment.
Beautiful, thanks!
Maybe one nit is to include a quick test case for your change in OMParser that would surface the previous regression if it would come back. Do you think this would be useful?
cc @Maniktherana would you like to review too and give your LGTM/comments? 🤗
The tests already fail on |
| defer func() { | ||
| p.ignoreExemplar = false | ||
| p.start = savedStart | ||
| p.l = resetLexer |
There was a problem hiding this comment.
why didn't I think of that
LGTM!
Follows #14978
Related to #13529
Fixes: #15137
Implement missing created timestamp handling