Update prometheus methods
This commit is contained in:
parent
9766ad8f4b
commit
55ccaf4be3
2 changed files with 22 additions and 3 deletions
|
|
@ -121,7 +121,10 @@ func main() {
|
|||
reg := prometheus.NewRegistry()
|
||||
|
||||
reg.MustRegister(prometheus.NewGoCollector())
|
||||
reg.MustRegister(prometheus.NewProcessCollector(os.Getpid(), ""))
|
||||
reg.MustRegister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{
|
||||
PidFn: func() (int, error) { return os.Getpid(), nil },
|
||||
ReportErrors: true,
|
||||
}))
|
||||
|
||||
mc, err := metric.NewCollector(conf.ListenPorts.Status, reg)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue