praefect: do not collect repository store metrics on startup
Our current code path will trigger the RepositoryStoreCollector to query the database on startup, even if the prometheus listener is not listening. This is because we call DescribeByCollect in the Describe method. The Prometheus client will call Describe on Register, which ends up triggering the Collect method and hence runs the queries. Instead, we can just provide the decriptions separately from the Collect method.
In fact, after !4085 (merged) now the query will potentially run twice on startup because we are registering it with the db_metrics
registry, as well as the normal metrics
registry.
closes: #3920 (closed)
Edited by John Cai