Skip to content

housekeeping: Add Prometheus metrics for on-disk repository states

Patrick Steinhardt requested to merge pks-housekeeping-repository-metrics into master

While we're already reporting on-disk repository metrics via the logging infrastructure, this does not easily allow for creating dashboards that includes all housekeeping-related data in a single place.

Introduce a bunch of new metrics that allow us to report on different data structures of repositories:

- Metrics reporting whether specific data structures or extensions
  exist in the first place.

- Metrics reporting about how many data structures exist, e.g. to
  count the number of loose objects or packfiles.

- Metrics reporting about the size of data structures, e.g. to
  report the size of `packed-refs`.

With this infrastructure in place it should be possible to build a high-level dashboard for repository housekeeping that reports on what gets repacked, how long it takes, and what the on-disk state of repos is.

Merge request reports