mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #41807 from shyamjvs/remove-fart-metrics
Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781) Remove unnecessary metrics (http/process/go) from being exposed by etcd-version-monitor Unregister metrics we do not want from the etcd version metrics handler. cc @wojtek-t @piosz
This commit is contained in:
commit
8fc311c96c
@ -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() {
|
|||||||
|
|
||||||
// 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))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user