mirror of
https://github.com/prometheus/prometheus.git
synced 2025-02-02 08:31:11 -08:00
[BUGFIX] Protobuf scraping: reset exemplar position
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
3aaf2c3c9d
commit
d599c4b28c
|
@ -409,6 +409,7 @@ func (p *ProtobufParser) Next() (Entry, error) {
|
|||
switch p.state {
|
||||
case EntryInvalid:
|
||||
p.metricPos = 0
|
||||
p.exemplarPos = 0
|
||||
p.fieldPos = -2
|
||||
n, err := readDelimited(p.in[p.inPos:], p.mf)
|
||||
p.inPos += n
|
||||
|
@ -485,6 +486,7 @@ func (p *ProtobufParser) Next() (Entry, error) {
|
|||
p.metricPos++
|
||||
p.fieldPos = -2
|
||||
p.fieldsDone = false
|
||||
p.exemplarPos = 0
|
||||
// If this is a metric family containing native
|
||||
// histograms, we have to switch back to native
|
||||
// histograms after parsing a classic histogram.
|
||||
|
|
Loading…
Reference in a new issue