Skip to content

Commit

Permalink
Fix test: update annotations copy logic
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyikjiun committed Feb 4, 2025
1 parent 77c2cdf commit 5965eed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions observability-lib/grafana/alerts.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ func NewAlertRule(options *AlertOptions) *alerting.RuleBuilder {
options.QueryRefCondition = "A"
}

annotations := maps.Clone(options.Annotations)
maps.Copy(annotations, map[string]string{
annotations := map[string]string{
"summary": options.Summary,
"description": options.Description,
"runbook_url": options.RunbookURL,
})
}
maps.Copy(annotations, options.Annotations)

if options.PanelTitle != "" {
annotations["panel_title"] = options.PanelTitle
Expand Down

0 comments on commit 5965eed

Please sign in to comment.