Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/alert-note-in-webhooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@hyperdx/api': patch
---

fix: `{{note}}` in webhook bodies now contains the alert's note when the alert
fires, not only in "Send test"
Original file line number Diff line number Diff line change
Expand Up @@ -4875,6 +4875,7 @@ describe('checkAlerts', () => {
description: 'generic webhook description',
body: JSON.stringify({
text: '{{link}} | {{title}}',
note: '{{note}}',
}),
headers: {
// @ts-expect-error type mismatch due to mongoose typing
Expand Down Expand Up @@ -4958,6 +4959,7 @@ describe('checkAlerts', () => {
threshold: 1,
dashboardId: dashboard.id,
tileId: '17quud',
note: 'Check the api pods',
},
{
taskType: AlertTaskType.TILE,
Expand Down Expand Up @@ -5027,6 +5029,7 @@ describe('checkAlerts', () => {
redirect: 'manual',
body: JSON.stringify({
text: `http://app:8080/dashboards/${dashboard.id}?from=1700170200000&granularity=5+minute&to=1700174700000&highlightedTileId=17quud | 🚨 Alert for "My Dashboard - Logs Count" - 3 meets or exceeds 1`,
note: 'Check the api pods',
}),
// Idempotency-Key is always injected last (cannot be overridden by user headers)
// and is a stable objectHash of {eventId, startTime, endTime, state}.
Expand Down
1 change: 1 addition & 0 deletions packages/api/src/tasks/checkAlerts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,7 @@ const fireChannelEvent = async ({
message: alert.message,
name: alert.name,
displayName: alert.displayName,
note: alert.note,
tags: alert.tags,
savedSearchId: savedSearch?.id,
silenced: alert.silenced,
Expand Down
Loading