mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 10:17:51 +00:00
if we are going to expose metrics, expose them for _our_ registry
This commit is contained in:
parent
2324e35c71
commit
8947fdf1fe
1 changed files with 1 additions and 1 deletions
|
|
@ -66,7 +66,7 @@ func NewMetrics() (*ServiceMetrics, error) {
|
||||||
func (m *ServiceMetrics) Run(port uint16) {
|
func (m *ServiceMetrics) Run(port uint16) {
|
||||||
go func() {
|
go func() {
|
||||||
mux := http.NewServeMux()
|
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))
|
klog.Fatal(http.ListenAndServe(fmt.Sprintf(":%d", port), mux))
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue