cmd: Update prometheus_client (fixes #5280) (#5282)

This commit is contained in:
Alexandre Viau
2018-10-21 11:11:26 -04:00
committed by Audrius Butkevicius
parent 9745679c63
commit 75f9ea623c
31 changed files with 2148 additions and 642 deletions

View File

@@ -14,7 +14,16 @@ import (
)
func init() {
prometheus.MustRegister(prometheus.NewProcessCollector(os.Getpid(), "syncthing_relaypoolsrv"))
processCollectorOpts := prometheus.ProcessCollectorOpts{
Namespace: "syncthing_relaypoolsrv",
PidFn: func() (int, error) {
return os.Getpid(), nil
},
}
prometheus.MustRegister(
prometheus.NewProcessCollector(processCollectorOpts),
)
}
var (