Move git_* and project_remote_mirror_* metrics out of gitlab-exporter
We're looking to sunset gitlab-exporter
in #288043 (closed).
NOTE: This epic used to suggest that we drop gitlab-exporter entirely. We have come to understand that this might not be the best solution or only option. The epic has been updated to reflect that.
There are a number of Git related metrics exported from it that we either need to retire or move:
git_push_time_milliseconds
git_pull_time_milliseconds
project_remote_mirror_last_update_time_seconds
project_remote_mirror_last_successful_update_time_seconds
The goal of this issue is to:
- Identify which of the mentioned metrics are still in use. If they are still in use, they should be documented. If not, they should be removed.
- If the metrics are in use, move them out of the exporter. This could happen in various ways, some suggestions below.
Use of the metrics
The proxies I have used for "metric is in use" so far were them being accessible in Thanos or referenced in the runbooks repo.
- Thanos:
-
project_remote_mirror_*
: available. -
git_*_time_milliseconds
: not available.
-
- Runbooks:
-
project_remote_mirror_*
: referenced. -
git_*_time_milliseconds
: not referenced.
-
Are there other uses of these metrics not covered above?
Migration of metrics
Our current approach to metrics collection is to have applications export their own metrics if possible. If we would like to keep these metrics, could they be exported by https://gitlab.com/gitlab-org/gitaly instead?
If not, could these be exported by the main Rails app instead, similar to the suggestions in #290747 (closed)?