mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
remove prometheus.DefaultRegisterer
This commit is contained in:
parent
8290400e9c
commit
744785ee40
@ -23,7 +23,6 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
@ -48,7 +47,7 @@ func TestRecordOperation(t *testing.T) {
|
||||
prometheusURL := "http://" + l.Addr().String() + "/metrics"
|
||||
mux := http.NewServeMux()
|
||||
//lint:ignore SA1019 ignore deprecated warning until we move off of global registries
|
||||
handler := promhttp.InstrumentMetricHandler(prometheus.DefaultRegisterer, promhttp.HandlerFor(registry, promhttp.HandlerOpts{}))
|
||||
handler := promhttp.HandlerFor(registry, promhttp.HandlerOpts{})
|
||||
mux.Handle("/metrics", handler)
|
||||
server := &http.Server{
|
||||
Addr: l.Addr().String(),
|
||||
|
Loading…
Reference in New Issue
Block a user