Skip to content

Commit

Permalink
fix: remove skipCT check from tBraceOpen
Browse files Browse the repository at this point in the history
Signed-off-by: Manik Rana <[email protected]>
  • Loading branch information
Maniktherana committed Aug 7, 2024
1 parent 900c127 commit 65e2afd
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions model/textparse/openmetricsparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,7 @@ func (p *OpenMetricsParser) Next() (Entry, error) {
}

p.series = p.l.b[p.start:p.l.i]
suffixEntry, err := p.parseMetricSuffix(p.nextToken())
if err != nil {
return EntryInvalid, err
}
if p.isCreatedSeries() && p.skipCTSeries {
return p.Next()
}
return suffixEntry, err
return p.parseMetricSuffix(p.nextToken())
case tMName:
p.offsets = append(p.offsets, p.start, p.l.i)
p.series = p.l.b[p.start:p.l.i]
Expand All @@ -471,9 +464,9 @@ func (p *OpenMetricsParser) Next() (Entry, error) {

suffixEntry, err := p.parseMetricSuffix(t2)
if err != nil {
return EntryInvalid, err
return suffixEntry, err
}
if p.isCreatedSeries() && p.skipCTSeries {
if p.skipCTSeries && p.isCreatedSeries() {
return p.Next()
}
return suffixEntry, err
Expand Down

0 comments on commit 65e2afd

Please sign in to comment.