Add logging to statemessage truncation (#1056)

This commit is contained in:
Jose Donizetti 2017-10-26 07:09:54 -02:00 committed by stuart nelson
parent 877d2780a0
commit 1c7bf17eec

View File

@ -896,6 +896,7 @@ func (n *VictorOps) Notify(ctx context.Context, as ...*types.Alert) (bool, error
if len(stateMessage) > 20480 {
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{