mirror of
https://github.com/prometheus/prometheus
synced 2025-03-19 18:04:07 +00:00
Allow UTF-8 labels in label_replace
This makes it consistent with label_join. Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
This commit is contained in:
parent
96f31e370b
commit
e4037b3ec3
@ -1612,7 +1612,7 @@ func (ev *evaluator) evalLabelReplace(ctx context.Context, args parser.Expressio
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("invalid regular expression in label_replace(): %s", regexStr))
|
||||
}
|
||||
if !model.LabelNameRE.MatchString(dst) {
|
||||
if !model.LabelName(dst).IsValid() {
|
||||
panic(fmt.Errorf("invalid destination label name in label_replace(): %s", dst))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user