MSP-8976 Up deps
This commit is contained in:
1 parent
b8ef777339
commit
11d705124d
603 files changed
+47715
-13202
No files matched your search
+4
-4
@@ -194,6 +194,7 @@ func (p *TextParser) reset(in io.Reader) {
|
||||
// start of a line (or whitespace leading up to it).
|
||||
func (p *TextParser) startOfLine() stateFn {
|
||||
p.lineCount++
|
||||
p.currentMetric = nil
|
||||
p.currentMetricIsInsideBraces = false
|
||||
p.currentMetricInsideBracesIsPresent = false
|
||||
if p.skipBlankTab(); p.err != nil {
|
||||
@@ -339,12 +340,11 @@ func (p *TextParser) startLabelName() stateFn {
|
||||
return nil // Unexpected end of input.
|
||||
}
|
||||
if p.currentByte == '}' {
|
||||
if p.currentMF == nil {
|
||||
if p.currentMetric == nil {
|
||||
// The closing brace was reached before any metric name was read,
|
||||
// e.g. for the input "{}". There is no metric to attach labels to,
|
||||
// so this is a malformed exposition. This mirrors the guard in
|
||||
// startLabelValue. currentMF (not currentMetric) is checked because
|
||||
// reset only clears currentMF between parses.
|
||||
// startLabelValue. currentMetric is cleared at the start of each line.
|
||||
p.parseError("invalid metric name")
|
||||
p.currentLabelPairs = nil
|
||||
return nil
|
||||
@@ -495,7 +495,7 @@ func (p *TextParser) startLabelValue() stateFn {
|
||||
return p.startLabelName
|
||||
|
||||
case '}':
|
||||
if p.currentMF == nil {
|
||||
if p.currentMetric == nil {
|
||||
p.parseError("invalid metric name")
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user