Metrics: Cleanup background workers & importers
Overview
⚠ Removal should take place in %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 likePrometheusAlert
are also used forAlertManagement::Alert
and should not be removed.
As part of Monitor: Metrics Deprecation and Removal (&10107), we want to delete the background processing tasks for the Metrics Dashboard pieces of Category:Metrics. This will include sidekiq workers & metrics importers.
Implementation plan
- Remove any migrations or triggers which start the import of system metrics or custom dashboards
- Remove classes corresponding to the import/background behavior
- Nullify relevant worker classes so they don't do any work
- Remove worker class files in next milestone
Relevant processes to follow
Relevant code
The list below is meant as an aid & may not be exhaustive.
app/workers/metrics/dashboard/sync_dashboards_worker.rb
app/workers/metrics/dashboard/prune_old_annotations_worker.rb
app/workers/metrics/dashboard/schedule_annotations_prune_worker.rb
app/workers/clusters/integrations/check_prometheus_health_worker.rb
lib/gitlab/database_importers/common_metrics/*
db/fixtures/development/99_common_metrics.rb
db/fixtures/production/999_common_metrics.rb
app/models/blob.rb::AUXILIARY_VIEWERS
app/models/blob_viewer/metrics_dashboard_yml.rb
ee/lib/gitlab/template/custom_metrics_dashboard_yml_template.rb
ee/app/finders/ee/template_finder.rb::CUSTOM_TEMPLATES
app/services/git/branch_hooks_service.rb
lib/gitlab/template/metrics_dashboard_template.rb
NOTE: Some worker classes may be marked with Category:Metrics but are not connected to metrics dashboard and should not be removed. ex) GitlabPerformanceBarStatsWorker
should not be removed.