Import common metrics into database.
What does this MR do?
Migrates all built-in metrics to the database to provide a common interface for dealing with all Prometheus Metrics.
This is backport of that functionality into CE which is required by EE to implement: https://gitlab.com/gitlab-org/gitlab-ee/issues/6948.
This MR adds two extra columns:
-
common: true|false
: indicates if this is system-wide or project-wide metric, -
identifier: string
: unique string to be used to identify common metric.
It imports data during system installation, and as well on-demand by preparing a database migration.
What are the relevant issue numbers?
Related to https://gitlab.com/gitlab-org/gitlab-ee/issues/6948
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides
Edited by Kamil Trzciński (Back 2025-01-01)