You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
{{note}} renders empty in webhook bodies when an alert fires #3644
{{note}} is empty in Generic and incident.io webhook bodies when an alert fires, even when the alert has a note. "Send test" does show a note, so the template looks right until a real alert fires.
The path, at current main:
fireChannelEvent builds the template view's alert as an object literal, and note is not one of its fields (checkAlerts/index.ts#L538-L565).
renderAlertTemplate reads note: alert.note ?? '' from that view, so it is always '' (template.ts#L770).
The Generic transport writes message.note into {{note}} (generic.ts#L105).
The test webhook builds its message with a hard-coded note, so it never takes this path (webhooks.ts#L517).
I found this reading the source and haven't triggered it on a running instance.
Steps to reproduce
Reproduces on play.hyperdx.io? didn't try
From the code above, this should show it:
Create an alert with a note, on a Generic webhook whose body includes {"note": "{{note}}"}.
Click "Send test": the receiver gets the sample note.
Let the alert fire: the receiver gets "note": "".
How are you running HyperDX?
Self-hosted app image with our own ClickHouse and the standalone collector. The code above is current main.
Where does it show up?
The API: webhook delivery from the alert worker.
Debug info
N/A, not a UI bug.
Logs
N/A.
The fix looks like one line, note: alert.note, in that literal, plus a test that renders {{note}} through the worker path. I'd be glad to send it if this is marked Accepting PR.
Activity