Metrics: Delete models & database tables/columns
Overview
⚠️ Removal should take place during %16.0.
⚠️ Category:Metrics code is intertwined with the metrics GitLab reports on itself. Only Category:Metrics should be removed. Similarly, some items named likePrometheusAlert
are also used forAlertManagement::Alert
and should not be removed.
As part of Monitor: Metrics Deprecation and Removal (&10107), we want to delete all models & data corresponding the Metrics Dashboard part of Category:Metrics.
Implementation plan
- Identify all data used exclusively for Category:Metrics
- Add ignore rules for the relevant columns in %16.0
- Delete all model files for the relevant tables %16.0
- Drop tables in a post-migrate migration %16.0
- Drop relevant columns in %16.1
- Remove ignore rules for columns in %16.2
Relevant processes to follow
- Migration style guide for dropping tables
- Guide for dropping columns
- Updating the database dictionary
Relevant code
The list below is meant as an aid & may not be exhaustive.
- Models & tables:
- Tables without models:
-
issues_prometheus_alert_events
-
issues_self_managed_prometheus_alert_events
-
- Columns:
- Models without tables:
-
app/models/performance_monitoring/*
-
lib/gitlab/prometheus/*
(except internal.rb in scope of gitlab-org/monitor/respond#112 (closed))
-
NOTE: Don't remove ApplicationSettings#prometheus_metrics_enabled
or ResourceStateEvents#close_auto_resolve_prometheus_alert
.
Edited by Sarah Yasonik