Skip to content

Commit

Permalink
Update promql.go
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxin688 authored Oct 26, 2024
1 parent 08550cd commit 24fdef4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion promql.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (pb *PromqlBuilder) Build() (string, error) {
if len(pb.labels) > 0 {
tmp := make([]string, len(pb.labels))
for index, label := range pb.labels {
tmp[index] = fmt.Sprintf("%s%s%s", label.Name, label.Matcher, label.Value)
tmp[index] = fmt.Sprintf(`%s%s"%s"`, label.Name, label.Matcher, label.Value)
}
basicql += fmt.Sprintf("{%s}", strings.Join(tmp, ","))
}
Expand Down

0 comments on commit 24fdef4

Please sign in to comment.