Metrics: Delete API entrypoints & helpers

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 like PrometheusAlert are also used for AlertManagement::Alert and should not be removed.

As part of Monitor: Metrics Deprecation and Removal (&10107 - closed), we want to remove any ability to interact with the Metrics Dashboard feature of Category:Metrics via API.

Implementation plan

For any API that must rely on prometheus alerts, prometheus metrics, metrics dashboard, or their configuration:

  1. Add deprecation notices to relevant graphql fields.
    • This is a gray-area between our feature&api removal guidelines. The underlying data will be going away in %16.0 whether the field technically does or not. We should remove the fields as planning in %16.0, but the late addition of the deprecation notice is a small curtesy we can provide, regardless of timeliness. EDIT: Removals should occur no earlier than %17.0. See https://gitlab.com/gitlab-org/gitlab/-/issues/410431+
  2. Remove relevant fields from GraphQL queries and mutations
  3. Remove relevant fields from the REST API, along with serializers
  4. Remove relevant presenters and methods in presenters

Relevant processes to follow

Relevant code

Edited by Rajendra Kadam