-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emit warning-level logs when truncating messages in notifications #3145
Conversation
notify/opsgenie/opsgenie.go
Outdated
if truncated { | ||
level.Debug(n.logger).Log("msg", "truncated message", "truncated_message", message, "alert", key) | ||
level.Debug(n.logger).Log("msg", "Truncated message", "alert", key, "runes", maxMessageLenRunes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standardized the capitalization of these to use a capital at the beginning. Please let me know if you'd rather me go the other way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
leaving the final word to @gotjosh
hey @gotjosh, any final comments here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, LGTM but I have one small nit.
Signed-off-by: Alex Weaver <[email protected]>
Signed-off-by: Alex Weaver <[email protected]>
Signed-off-by: Alex Weaver <[email protected]>
Signed-off-by: Alex Weaver <[email protected]>
Signed-off-by: Alex Weaver <[email protected]>
Signed-off-by: Alex Weaver <[email protected]>
Signed-off-by: Alex Weaver <[email protected]>
Some integrations define maximum lengths of messages that they accept. We usually respect these, by truncating the user's message for them.
Since we are actively modifying what the user asked us to send, let's log this event at warning level. That way, operators can more easily see when their message is too long, and know that we changed it for them.
Fixes #3134
We no longer log the full-blown message per #3134 (comment).