mirror of
https://github.com/prometheus/alertmanager
synced 2024-12-29 09:32:16 +00:00
Add logging to statemessage truncation (#1056)
This commit is contained in:
parent
877d2780a0
commit
1c7bf17eec
@ -896,6 +896,7 @@ func (n *VictorOps) Notify(ctx context.Context, as ...*types.Alert) (bool, error
|
|||||||
|
|
||||||
if len(stateMessage) > 20480 {
|
if len(stateMessage) > 20480 {
|
||||||
stateMessage = stateMessage[0:20475] + "\n..."
|
stateMessage = stateMessage[0:20475] + "\n..."
|
||||||
|
level.Debug(n.logger).Log("msg", "Truncated stateMessage due to VictorOps stateMessage limit", "truncated_state_message", stateMessage, "incident", key)
|
||||||
}
|
}
|
||||||
|
|
||||||
msg := &victorOpsMessage{
|
msg := &victorOpsMessage{
|
||||||
|
Loading…
Reference in New Issue
Block a user