Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use prometheus.Gatherers to avoid duplicating std collectors
Seen on github.com/minio/minio/cmd/metrics.go This way, the ProcessCollector and the GoCollector will operate on the Prometheus DefaultRegistry, whose durability is the same as the process. On the other hand, the registry we instantiate per server will live and die with it. I was inclined to implement this because I think that otherwise we ended up with a redundant set of *Collectors, ones instantiated by us, and the othe ones instantiated by the prometheus library, as goodies of the DefaultRegistry. Besides, now I know how to make use of multiple registries (via Gatherers, which kinda melds them).
- Loading branch information