Metrics: Delete usage in services, finders, etc
Overview
⚠ Removal should take place during %16.0 or later.
⚠ Category:Metrics code is intertwined with the metrics GitLab reports on itself. Only Category:Metrics should be removed. Similarly, some items named likePrometheusAlertare also used forAlertManagement::Alertand should not be removed.
As part of Monitor: Metrics Deprecation and Removal (&10107 - closed), we want to remove all usages of the Metrics Dashboard part of Category:Metrics. This may be in services, finders, through model associations, etc. The models & data will be removed as part of Metrics: Delete models & database tables/columns (#397142 - closed).
Implementation plan
- Delete all service classes made obsolete by:
- Delete relevant finder classes no longer in use
- Find & remove any remaining usages of metrics dashboard models
Relevant code
The lists below are meant as an aid & may not be exhaustive.
Deletions:
app/services/metrics/dashboard/\*app/services/prometheus/\*app/services/metrics/\*lib/gitlab/metrics/dashboard/\*config/prometheus/common_metrics.ymlapp/finders/metrics/*
Cleanups:
app/models/environment.rbapp/models/project.rbee/app/services/dashboard/operations/list_service.rb-
app/models/integrations/prometheus.rb[Prometheus Alert Integrations use this as a data store, so we can't get rid of it entirely yet] also see https://gitlab.com/gitlab-org/gitlab/-/issues/409734 app/policies/project_policy.rbee/app/models/gitlab_subscriptions/features.rb
Edited by Luke Duncalfe