Associate Generic Alerts and Issues

Similar to #32538 (closed) and #33184 (closed), but for generic alerts.

This is needed before we can achieve:

  • Auto recovery of generic alerts (#13402 (closed))
  • Metrics such as counting the number of times a Generic Alert has fired. (This could be done with a count on the Alert Event, or whatever we end up creating).

We need a way to link Issues we create and the Alerts that cause us to create them.

Background:

For Gitlab-managed Prometheus, we have the following models to help achieve this:

  • PrometheusAlert, which is created via the Metrics dashboard
  • PrometheusAlertEvent which we create when we receive an alert Payload from Prometheus.
  • Issue which we also create as a result of receiving the alert Payload from Prometheus

For Generic alerts, we don't have any Alerts, and so nothing to create the events off and associate with the Issues. Right now, we simply create the Issues with no way to link back to the alert that created them.

Options:

  • Create some kind of AlertEvent for these? We'll need to infer uniqueness from the generic alerts for this to work.
  • Something else?
Assignee Loading
Time tracking Loading