Skip to content

metrics: introduce MustRegisterDiskMonitor

Administrator requested to merge core/monitor-disk into master

Created by: keegancsmith

This will register a generic metric which can be used across all sourcegraph services. It reports how much space is available and free for the FS that a path is part of. It is generic version of our existing metrics "src_gitserver_disk_space_available" and "src_gitserver_disk_space_total".

This PR adds this metric for the services frontend, searcher, replacer and gitserver.

Note: We don't set subsystem since we want to be able to see the space used across services with one metric family. To differentiate between services we will rely on the labels prometheus adds on collection and the path.

Part of https://github.com/sourcegraph/sourcegraph/issues/8308

Merge request reports

Loading