if we are going to expose metrics, expose them for _our_ registry

This commit is contained in:
pdbogen 2019-07-23 14:25:08 -07:00
parent 2324e35c71
commit 8947fdf1fe

View file

@ -66,7 +66,7 @@ func NewMetrics() (*ServiceMetrics, error) {
func (m *ServiceMetrics) Run(port uint16) {
go func() {
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.Handler())
mux.Handle("/metrics", promhttp.HandlerFor(m.Registry, promhttp.HandlerOpts{}))
klog.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), mux))
}()
}