diff --git a/notify/opsgenie/opsgenie.go b/notify/opsgenie/opsgenie.go index a3ba2f454e..426734f275 100644 --- a/notify/opsgenie/opsgenie.go +++ b/notify/opsgenie/opsgenie.go @@ -176,7 +176,7 @@ func (n *Notifier) createRequests(ctx context.Context, as ...*types.Alert) ([]*h default: message, truncated := notify.TruncateInRunes(tmpl(n.conf.Message), maxMessageLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated message", "alert", key, "runes", maxMessageLenRunes) + level.Warn(n.logger).Log("msg", "Truncated message", "alert", key, "max_runes", maxMessageLenRunes) } createEndpointURL := n.conf.APIURL.Copy() diff --git a/notify/pagerduty/pagerduty.go b/notify/pagerduty/pagerduty.go index 1e549db8f3..b6b816e039 100644 --- a/notify/pagerduty/pagerduty.go +++ b/notify/pagerduty/pagerduty.go @@ -157,7 +157,7 @@ func (n *Notifier) notifyV1( description, truncated := notify.TruncateInRunes(tmpl(n.conf.Description), maxV1DescriptionLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated description", "key", key, "runes", maxV1DescriptionLenRunes) + level.Warn(n.logger).Log("msg", "Truncated description", "key", key, "max_runes", maxV1DescriptionLenRunes) } serviceKey := string(n.conf.ServiceKey) @@ -222,7 +222,7 @@ func (n *Notifier) notifyV2( summary, truncated := notify.TruncateInRunes(tmpl(n.conf.Description), maxV2SummaryLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated summary", "key", key, "runes", maxV2SummaryLenRunes) + level.Warn(n.logger).Log("msg", "Truncated summary", "key", key, "max_runes", maxV2SummaryLenRunes) } routingKey := string(n.conf.RoutingKey) diff --git a/notify/pushover/pushover.go b/notify/pushover/pushover.go index 3a3361a039..c5fc287a7b 100644 --- a/notify/pushover/pushover.go +++ b/notify/pushover/pushover.go @@ -89,7 +89,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) title, truncated := notify.TruncateInRunes(tmpl(n.conf.Title), maxTitleLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated title", "incident", key, "runes", maxTitleLenRunes) + level.Warn(n.logger).Log("msg", "Truncated title", "incident", key, "max_runes", maxTitleLenRunes) } parameters.Add("title", title) @@ -102,7 +102,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) message, truncated = notify.TruncateInRunes(message, maxMessageLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated message", "incident", key, "runes", maxMessageLenRunes) + level.Warn(n.logger).Log("msg", "Truncated message", "incident", key, "max_runes", maxMessageLenRunes) } message = strings.TrimSpace(message) if message == "" { @@ -113,7 +113,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) supplementaryURL, truncated := notify.TruncateInRunes(tmpl(n.conf.URL), maxURLLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated URL", "incident", key, "runes", maxURLLenRunes) + level.Warn(n.logger).Log("msg", "Truncated URL", "incident", key, "max_runes", maxURLLenRunes) } parameters.Add("url", supplementaryURL) parameters.Add("url_title", tmpl(n.conf.URLTitle)) diff --git a/notify/slack/slack.go b/notify/slack/slack.go index 428519397a..22bb30932e 100644 --- a/notify/slack/slack.go +++ b/notify/slack/slack.go @@ -109,7 +109,7 @@ func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error) if err != nil { return false, err } - level.Warn(n.logger).Log("msg", "Truncated title", "key", key, "runes", maxTitleLenRunes) + level.Warn(n.logger).Log("msg", "Truncated title", "key", key, "max_runes", maxTitleLenRunes) } att := &attachment{ Title: title, diff --git a/notify/telegram/telegram.go b/notify/telegram/telegram.go index f02b8bdb11..90e0ca35af 100644 --- a/notify/telegram/telegram.go +++ b/notify/telegram/telegram.go @@ -76,7 +76,7 @@ func (n *Notifier) Notify(ctx context.Context, alert ...*types.Alert) (bool, err messageText, truncated := notify.TruncateInRunes(tmpl(n.conf.Message), maxMessageLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated message", "alert", key, "runes", maxMessageLenRunes) + level.Warn(n.logger).Log("msg", "Truncated message", "alert", key, "max_runes", maxMessageLenRunes) } message, err := n.client.Send(telebot.ChatID(n.conf.ChatID), messageText, &telebot.SendOptions{ diff --git a/notify/victorops/victorops.go b/notify/victorops/victorops.go index 8111cc8ec4..02c9362190 100644 --- a/notify/victorops/victorops.go +++ b/notify/victorops/victorops.go @@ -139,7 +139,7 @@ func (n *Notifier) createVictorOpsPayload(ctx context.Context, as ...*types.Aler stateMessage, truncated := notify.TruncateInRunes(stateMessage, maxMessageLenRunes) if truncated { - level.Warn(n.logger).Log("msg", "Truncated state_message", "incident", key, "runes", maxMessageLenRunes) + level.Warn(n.logger).Log("msg", "Truncated state_message", "incident", key, "max_runes", maxMessageLenRunes) } msg := map[string]string{