Skip to content

Commit

Permalink
fix: event relable process tagsmap
Browse files Browse the repository at this point in the history
  • Loading branch information
710leo committed Jul 22, 2024
1 parent e98fe9e commit 5b5bb22
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions alert/dispatch/consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ func (e *Consumer) relabel(event *models.AlertCurEvent) {
// relabel process
relabels := writer.Process(labels, rule.EventRelabelConfig...)
event.TagsJSON = make([]string, len(relabels))
event.TagsMap = make(map[string]string, len(relabels))
for i, label := range relabels {
event.TagsJSON[i] = fmt.Sprintf("%s=%s", label.Name, label.Value)
event.TagsMap[label.Name] = label.Value
Expand Down

0 comments on commit 5b5bb22

Please sign in to comment.