Generic webhook template doesn't identify which metric attribute/label combination (e.g. trace name) triggered the alert
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- observability
Direzione di ricerca
L’issue non indica file né test. Inizia individuando la gestione dei template generici dei webhook, la valutazione degli alert metrici e i percorsi della cronologia degli alert di External API v2; traccia il percorso delle label di serie implicite ed esplicite fino all’attivazione. Il lavoro è completato quando le combinazioni di attributi che superano la soglia sono disponibili nei template dei webhook e nelle risposte della cronologia degli alert, con un comportamento definito per una o più consegne dei webhook.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
My alert is on a dashboard tile with a single series: a metrics data source, a gauge aggregation, and a where clause — no groupBy is configured anywhere in the tile. Despite that, the chart renders multiple lines, because the underlying OTel metric carries multiple distinct attribute/label combinations (e.g. per trace/span name), and HyperDX implicitly plots one line per unique combination even though I never set an explicit group-by.
When the alert fires, the generic webhook body currently supports {{title}}, {{body}}, {{link}}, {{state}}, {{startTime}}, {{endTime}}, and {{eventId}}. None of these identify which underlying attribute combination (e.g. which trace name) actually crossed the threshold — the payload describes the alert's overall state and timing, but has no reference to the specific label values that produced the offending line.
This makes it impossible to route or triage generic webhook alerts without manually opening the dashboard and visually picking out which of the several implicit lines crossed the threshold. For downstream automation (custom incident routing, deduping, auto-annotating tickets, posting to the right team channel, etc.) this is a hard blocker — the alert is not attributable to a specific cause without a human eyeballing the chart.
Current behavior
- Dashboard tile: single series, metrics data source, gauge value,
whereclause. NogroupByconfigured. - The metric itself has multiple attribute/label combinations (e.g. per-trace or per-span name), so the tile implicitly renders several lines even without an explicit group-by.
- Alert is attached to this tile/series.
- On firing, the generic webhook body supports
{{title}},{{body}},{{link}},{{state}},{{startTime}},{{endTime}}, and{{eventId}}. - None of these resolve to the specific attribute/label combination (e.g. trace name) whose line crossed the threshold —
{{link}}sends you to the tile, and the rest describe the alert's state/timing/ID, but none carry the identity of the offending line. You still have to visually inspect the chart to identify it.
Expected behavior
The webhook payload/template should include the specific attribute/label combination that breached the threshold for that firing — e.g. a {{seriesLabels}} or {{attributeValue}} (name TBD) template variable, populated with the trace name / span name / other metric attribute value that produced the crossing line.
This is closely related to (and possibly the same underlying gap as) groupBy-based alerts not surfacing the specific group value that fired — in both cases, the tile can implicitly or explicitly contain multiple lines, and the webhook has no way to say which one triggered.
Why this matters
Without this, generic webhook consumers (custom bots, incident routing via generic webhook, internal Slack bots, etc.) can only say "something on this metric tile crossed a threshold" — not "trace X crossed the threshold." For any metric with multiple attribute combinations feeding one tile, this makes the alert nearly useless for automated triage; a human has to click through and visually inspect the chart every time just to know what actually needs attention.
Suggested implementation
- Add a template variable (e.g.
{{seriesLabels}}) available in the generic webhook body template, populated per-firing with the specific attribute/label combination (as key-value pairs) of the line that breached. - Since a metric-source tile with no explicit
groupBycan still implicitly fan out into many lines by attribute combination, consider either:- firing one webhook call per breaching attribute combination (each with its own labels), or
- including an array of breaching attribute combinations in the payload if a single call is preferred.
- Apply the equivalent fix for explicit
groupBy-based alerts (surface the specific group value that fired, not just the field being grouped on) — same underlying gap, different mechanism for producing multiple lines. - Expose the same field on the External API v2 alert-history/evaluation response, if separate from the webhook payload, so it's fetchable after the fact too.
Environment
- Alert type: Dashboard tile alert (chart), single series, metrics data source, gauge aggregation,
whereclause, nogroupByconfigured - Multiple alerts appear implicitly due to distinct attribute/label combinations in the underlying metric
- Notification channel: Generic Webhook
- Lingua principale
- TypeScript
- Stelle
- 10k
- Fork
- 508
- Merge medio
- 2g 6h
- PR unite (30g)
- 156
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperdxio/hyperdx
-
Metric chart with aggFn increase and a multi-column group-by fails: toString() gets several argumentsForse già presa @CG-5228 l’ha presa 9 giorni fa. Apertaexternal
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
hyperdxio/hyperdx#3477 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Slack notifications for inline alerts fail when the chart-explorer link passes Slack's 3000-character block limitForse già presa @Tyagiquamar l’ha presa 11 giorni fa. Apertaalerting bug external
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 2 giorni
-
bug external Needs Feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hyperdxio/hyperdx#3308 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
external
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di hyperdxio/hyperdx
Issue simili
-
cloudflare-cache-binding: `unstorage://` keys are rejected by the Cache API, cache never storesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 2 giorni
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
anomalyco/opencode#62052 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
strapi/design-system#2084 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno