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 {
|
switch p.state {
|
||||||
case EntryInvalid:
|
case EntryInvalid:
|
||||||
p.metricPos = 0
|
p.metricPos = 0
|
||||||
|
p.exemplarPos = 0
|
||||||
p.fieldPos = -2
|
p.fieldPos = -2
|
||||||
n, err := readDelimited(p.in[p.inPos:], p.mf)
|
n, err := readDelimited(p.in[p.inPos:], p.mf)
|
||||||
p.inPos += n
|
p.inPos += n
|
||||||
|
@ -485,6 +486,7 @@ func (p *ProtobufParser) Next() (Entry, error) {
|
||||||
p.metricPos++
|
p.metricPos++
|
||||||
p.fieldPos = -2
|
p.fieldPos = -2
|
||||||
p.fieldsDone = false
|
p.fieldsDone = false
|
||||||
|
p.exemplarPos = 0
|
||||||
// If this is a metric family containing native
|
// If this is a metric family containing native
|
||||||
// histograms, we have to switch back to native
|
// histograms, we have to switch back to native
|
||||||
// histograms after parsing a classic histogram.
|
// histograms after parsing a classic histogram.
|
||||||
|
|
Loading…
Reference in a new issue