Description
Describe the bug
Discord webhooks have a 1024 character limit for the value field. The current implementation exceeds this causing notifications to Discord to fail.
Messages sent to Discord need to be split into multiple 1024-character messages.
Reference:
https://birdie0.github.io/discord-webhooks-guide/other/field_limits.html
https://discord.com/developers/docs/resources/channel#embed-object-embed-field-structure
To Reproduce
Cause a CrashLoopBackOff on a pod that is within the monitoring scope of kwatch.
Expected behavior
A notification successfully sent to Discord via the configured webhook.
Actual behavior
Error is logged within kwatch in regards to a failed notification due to exceeding the 1024 character limit.
level=error msg="failed to send event with Discord: HTTP 400 Bad Request, {\"code\": 50035, \"errors\": {\"embeds\": {\"0\": {\"fields\": {\"6\": {\"value\": {\"_errors\": [{\"code\": \"BASE_TYPE_MAX_LENGTH\", \"message\": \"Must be 1024 or fewer in length.\"}]}}}}}}, \"message\": \"Invalid Form Body\"}"
Version/Commit
0.8.0
Activity
Zenteno commentedon Jun 7, 2023
This problem also happens on telegram
dunglavmo commentedon Oct 13, 2023
same issue!
willyfransca commentedon Sep 17, 2024
you manual update the code for limit the character to 1000 character

path: alertmanager/discord/discord.go
the souce code like this
this worked for me
thank
abahmed commentedon Sep 6, 2026
Fixed in main, but not released yet. Discord event and log content is split into Discord-safe 1024-character embed fields and capped to the provider field limit. The fix will be available in the next release.
abahmed commentedon Oct 19, 2026
🎉 This is now released in kwatch v1.0.0: https://github.com/abahmed/kwatch/releases/tag/v1.0.0
Upgrade with the installer:
/bin/bash -c "$(curl -fsSL https://kwatch.dev/kwatch.sh)"Coming from 0.10.x? Check the upgrade notes in the release first. Feedback is welcome in #564 🙏