Skip to content

Commit cfaa159

Browse files
committed
expfmt: throw error when metric's name not provided
1 parent 0ad974f commit cfaa159

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

expfmt/text_parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ func (p *TextParser) startLabelValue() stateFn {
417417
return p.startLabelName
418418

419419
case '}':
420-
if p.currentMF == nil {
420+
if p.currentMF == nil || p.currentMetric == nil {
421421
p.parseError("invalid metric name")
422422
return nil
423423
}

0 commit comments

Comments
 (0)