-
-
Save hydrosquall/e9d264e7a4afc0ecafa0aa6c361a3e7a to your computer and use it in GitHub Desktop.
{ | |
"embeds":[ | |
{ | |
"title":"$EVENT_TITLE", | |
"url":"$LINK", | |
"description":"$EVENT_MSG", | |
"thumbnail":{ | |
"url":"$SNAPSHOT" | |
} | |
}, | |
{ | |
"fields":[ | |
{ | |
"name":"tags", | |
"value":"$TAGS", | |
"inline":true | |
} | |
] | |
} | |
] | |
} |
Oh, I see - you are hoping for the embed image or thumbnail ( https://birdie0.github.io/discord-webhooks-guide/structure/embed/thumbnail.html ).
That should still be working, sometimes it takes a few minutes for the snapshot URL to generate. To debug, I suggest putting the $SNAPSHOT variable into your message, and checking how long it takes for that to start pointing to a valid URL.
Ah i see in my test notification for couple i got the thumbnail image but most of the time it doesnt show. so do you have any suggestions? how can i fix it ?
{
"embeds":[
{
"title":"$EVENT_TITLE",
"url":"$LINK",
"description":"$EVENT_MSG",
"thumbnail":{
"url":"$SNAPSHOT"
}
},
{
"fields":[
{
"name":"tags",
"value":"$TAGS",
"inline":true
}
]
}
]
}
this is the payload im using
It's hard to know what. most of the time means, I can't tell if that's an issue on Discord or Datadog's side. For cases when it doesn't show, does the clickable link still work, or is that broken too?
…
On Wed, Mar 6, 2024 at 3:51 PM hasan4temp @.> wrote: @.* commented on this gist. ------------------------------ Oh, I see - you are hoping for the embed image or thumbnail ( https://birdie0.github.io/discord-webhooks-guide/structure/embed/thumbnail.html ). That should still be working, sometimes it takes a few minutes for the snapshot URL to generate. To debug, I suggest putting the $SNAPSHOT variable into your message, and checking how long it takes for that to start pointing to a valid URL. Ah i see in my test notification for couple i got the thumbnail image but most of the time it doesnt show. so do you have any suggestions? how can i fix it ? — Reply to this email directly, view it on GitHub https://gist.github.com/hydrosquall/e9d264e7a4afc0ecafa0aa6c361a3e7a#gistcomment-4973801 or unsubscribe https://github.com/notifications/unsubscribe-auth/ACE2MMYVC2YERMXHHQSJLKDYW56V5BFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVEYTANZUG4ZDCNJXU52HE2LHM5SXFJTDOJSWC5DF . You are receiving this email because you authored the thread. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
Yeah the link works. Then I'll have to settle with this. Thanks for your help
Chiming in here as I'm encountering similar issues.
While investigating, I found out that discord's support of markdown is somewhat limited, and doesn't include images. The $EVENT_MSG
and $INCIDENT_MSG
vars in datadog both include an image markdown link, but since discord doesn't support it, it will instead always display that ugly [![Metric Graph](https://...)
Additionally after doing some additional testing, I confirmed that sometimes the thumbnail image won't display because $SNAPSHOT
URL will point to an image that hasn't been generated yet. The solution would be to wait a little bit before displaying the message, but I don't think there's a way to do that with discord (I'm considering creating a simple app that waits/processes the message before it reaches discord to fix the issue...).
For now, I'm using this setup, which is admittedly less "complete", but is concise & clear at a glance, even without the image. Somehow in my testing the image seems to render much more often, though I could have just been lucky:
{
"avatar_url": "https://cdn-1.webcatalog.io/catalog/datadog/datadog-icon.png",
"embeds": [
{
"title": "$ALERT_TITLE",
"color": 6499494,
"url": "$LINK",
"description": "### $EVENT_TITLE\n$ALERT_STATUS",
"image": {
"url": "$SNAPSHOT"
}
},
{
"fields": [
{
"name": "tags",
"value": "$TAGS",
"inline": true
}
]
}
]
}
Chiming in here as I'm encountering similar issues.
While investigating, I found out that discord's support of markdown is somewhat limited, and doesn't include images. The
$EVENT_MSG
and$INCIDENT_MSG
vars in datadog both include an image markdown link, but since discord doesn't support it, it will instead always display that ugly[![Metric Graph](https://...)
Additionally after doing some additional testing, I confirmed that sometimes the thumbnail image won't display because
$SNAPSHOT
URL will point to an image that hasn't been generated yet. The solution would be to wait a little bit before displaying the message, but I don't think there's a way to do that with discord (I'm considering creating a simple app that waits/processes the message before it reaches discord to fix the issue...).For now, I'm using this setup, which is admittedly less "complete", but is concise & clear at a glance, even without the image. Somehow in my testing the image seems to render much more often, though I could have just been lucky:
{ "avatar_url": "https://cdn-1.webcatalog.io/catalog/datadog/datadog-icon.png", "embeds": [ { "title": "$ALERT_TITLE", "color": 6499494, "url": "$LINK", "description": "### $EVENT_TITLE\n$ALERT_STATUS", "image": { "url": "$SNAPSHOT" } }, { "fields": [ { "name": "tags", "value": "$TAGS", "inline": true } ] } ] }
the avatar is nice but i still dont see graph image.
Yeah it's a dice roll whether Datadog creates the image in time before discord receives & shows the post. I don't think there's a way around that at the moment.
I really do need to create middleman app to fix this.
Oh, I see - you are hoping for the embed image or thumbnail ( https://birdie0.github.io/discord-webhooks-guide/structure/embed/thumbnail.html ).
That should still be working, sometimes it takes a few minutes for the snapshot URL to generate. To debug, I suggest putting the $SNAPSHOT variable into your message, and checking how long it takes for that to start pointing to a valid URL.