Commit d5a28b36 authored by Shyam Jeedigunta's avatar Shyam Jeedigunta

Remove unnecessary metrics (http/process/go) from being exposed by etcd-version-monitor

parent e65ac460
...@@ -218,7 +218,7 @@ func main() { ...@@ -218,7 +218,7 @@ func main() {
// Register the metrics we defined above with prometheus. // Register the metrics we defined above with prometheus.
prometheus.MustRegister(etcdVersion) prometheus.MustRegister(etcdVersion)
prometheus.MustRegister(etcdGRPCRequestsTotal) prometheus.MustRegister(etcdGRPCRequestsTotal)
prometheus.Unregister(prometheus.NewGoCollector()) // Unregister go metrics. prometheus.Unregister(prometheus.NewGoCollector())
// Spawn threads for periodically scraping etcd version metrics. // Spawn threads for periodically scraping etcd version metrics.
stopCh := make(chan struct{}) stopCh := make(chan struct{})
...@@ -228,6 +228,6 @@ func main() { ...@@ -228,6 +228,6 @@ func main() {
// Serve our metrics on listenAddress/metricsPath. // Serve our metrics on listenAddress/metricsPath.
glog.Infof("Listening on: %v", listenAddress) glog.Infof("Listening on: %v", listenAddress)
http.Handle(metricsPath, prometheus.Handler()) http.Handle(metricsPath, prometheus.UninstrumentedHandler())
glog.Errorf("Stopped listening/serving metrics: %v", http.ListenAndServe(listenAddress, nil)) glog.Errorf("Stopped listening/serving metrics: %v", http.ListenAndServe(listenAddress, nil))
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment