Skip to content

Commit 728722b

Browse files
committed
Don't unregister 'go' and 'process' collectors
Might be useful for someone. Via prometheus/docs#980 (review)
1 parent 77478a2 commit 728722b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

exporter.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ func (e *Exporter) Run() error {
100100
if err := prometheus.Register(c); err != nil {
101101
return errors.Wrap(err, "failed to register metrics")
102102
}
103-
prometheus.Unregister(prometheus.NewProcessCollector(os.Getpid(), ""))
104-
prometheus.Unregister(prometheus.NewGoCollector())
105103

106104
http.HandleFunc("/healthz", e.healthz)
107105
http.Handle("/metrics", promhttp.Handler())

0 commit comments

Comments
 (0)