Repository navigation
feat(webhooks): support incident severity in generic alerts and routing - #204
Merged
singret merged 2 commits intoNov 9, 2026
Merged
Conversation
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The generic webhook currently creates only critical or high incidents. Add an optional
incident_severityfield acceptingcritical,high,medium, andlow, so monitoring tools can create incidents at any supported level independently of alert severity.For example,
{"title":"Connection unstable","severity":"info","incident_severity":"low"}creates a low-severity incident. Omitting the field preserves the current behavior: critical → critical, warning → high, info → no incident.suppresscontinues to prevent incident creation. Existing routing severity overrides also retain precedence.Routing
severity_overridealso accepts all four incident levels for every provider (Prometheus, Grafana, CloudWatch, and generic). The routing UI exposes these levels, and existingwarning→highandinfo→ no incident behavior is preserved. The original monitoring severity remains stored, and escalation policy selection is unaffected. No database migration is needed.Type of change
Testing
go test ./internal/models/webhooks ./internal/serviceswithREGEN_LIFECYCLE_TEST_DSNpointing to an isolated PostgreSQL 15 test database. This includes the PostgreSQL lifecycle tests.tsc --noEmitusing Node 22 in a container.git diff --check.Related issues