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
13 changes: 13 additions & 0 deletions .changeset/alert-evaluation-error-persistence.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@hyperdx/common-utils': minor
'@hyperdx/api': minor
---

Persist alert evaluation errors (query errors, timeouts, webhook failures) as
ERROR-state AlertHistory records instead of only a latest-only snapshot,
upserted per evaluation window so retries collapse into a single row. Query
timeouts are classified separately (QUERY_TIMEOUT, including timeouts wrapped
by the ClickHouse query client) with an actionable message. ERROR rows are
excluded from scheduling/backfill computations so failed windows are still
retried and backfilled, and evaluation analytics (query/webhook durations,
backfilled buckets) are recorded on every history row.
1 change: 1 addition & 0 deletions packages/api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"type": "string",
"enum": [
"QUERY_ERROR",
"QUERY_TIMEOUT",
"WEBHOOK_ERROR",
"INVALID_ALERT",
"UNKNOWN"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/routers/external-api/v2/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import { alertSchema, objectIdSchema } from '@/utils/zod';
* description: Channel type.
* AlertErrorType:
* type: string
* enum: [QUERY_ERROR, WEBHOOK_ERROR, INVALID_ALERT, UNKNOWN]
* enum: [QUERY_ERROR, QUERY_TIMEOUT, WEBHOOK_ERROR, INVALID_ALERT, UNKNOWN]
* description: Category of error recorded during alert execution.
* AlertExecutionError:
* type: object
Expand Down
Loading
Loading