Skip to content

Allow Prometheus' metrics dashboard and incoming alerts to be managed independently

Context

Prometheus Integrations were removed in %16.0 as part of removing Metrics Dashboard. The corresponding database records, however, are also used under the hood by prometheus-type alert integrations. The alerting functionality is not deprecated or scheduled for removal, so we need to split this functionality out in order to remove the dead code for Prometheus Integrations.

Feature definitions

  • Prometheus Integrations Category:Metrics
    • found under project > Settings > Integrations
    • feature removed from UI, backend code intended for deletion
  • Metrics Dashboard Category:Metrics
    • found under project > Monitor > Metrics
    • feature removed from UI, code deleted
  • alert integrations Category:Incident Management
    • found under project > Settings > Monitor > Alerts
    • accessed/used under project > Monitor > Alerts
    • feature is not deprecated

In-progress Plan

Overall approach

Move the relevant attributes from Prometheus Integrations (Integrations::Prometheus, Alerting::ProjectAlertingSetting) into the http-type alert integration table (AlertManagement::HttpIntegration), adding a new type field to indicate whether the integration is either Prometheus or HTTP. All other attributes are the same.

Implementation plan

  1. Add types to table for AlertManagement::HttpIntegration
  2. Migrate Integrations::Prometheus records into AlertManagement::HttpIntegration
  3. Sync updates from Integrations::Prometheus to AlertManagement::HttpIntegration
  4. Allow alert ingestion to use AlertManagement::HttpIntegration as SSOT
  5. Support querying by prometheus-type records in GraphQL ◀️ WE ARE HERE
  6. Update existing prometheus-type mutations to interact with AlertManagement::HttpIntegrations directly (instead of through Integrations::Prometheus)
  7. Update existing http-type mutations to accept a type field & deprecate prometheus-type mutations
  8. Migrate frontend to use http mutations for prometheus-type integrations
  9. Delete all the Integrations::Prometheus things (in https://gitlab.com/gitlab-org/gitlab/-/issues/409734)


⚠️ NOTE: This issue description was drastically altered on 2023-10-12 to strip away now-irrelevant historical context/discussions/options. The description history remains available if this is needed.

Edited by 🤖 GitLab Bot 🤖