Merge pull request #13831 from prometheus/cherry-pick-13803

Release 2.51: Cherry-pick #13803 bugfix for label_join
pull/13850/head
Bartlomiej Plotka 2024-03-26 12:17:10 +01:00 committed by GitHub
commit d771cabc95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -1386,6 +1386,9 @@ func (ev *evaluator) evalLabelJoin(args parser.Expressions) (parser.Value, annot
}
srcLabels[i-3] = src
}
if !model.LabelName(dst).IsValid() {
panic(fmt.Errorf("invalid destination label name in label_join(): %s", dst))
}
val, ws := ev.eval(args[0])
matrix := val.(Matrix)