diff --git a/pkg/daemon/daemon.go b/pkg/daemon/daemon.go index 4cca80bc..277de9df 100644 --- a/pkg/daemon/daemon.go +++ b/pkg/daemon/daemon.go @@ -520,7 +520,7 @@ func servePrometheusMetrics(configParams *config.Config) { } if !configParams.PrometheusProcessMetricsEnabled { log.Info("Discarding process metrics") - prometheus.Unregister(prometheus.NewProcessCollector(os.Getpid(), "")) + prometheus.Unregister(prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{})) } } http.Handle("/metrics", promhttp.Handler())