mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
do not install handler for /metrics/slis using sync.Once
This commit is contained in:
parent
f5fd936df4
commit
93a63da852
@ -38,8 +38,8 @@ type SLIMetrics struct{}
|
|||||||
func (s SLIMetrics) Install(m mux) {
|
func (s SLIMetrics) Install(m mux) {
|
||||||
installOnce.Do(func() {
|
installOnce.Do(func() {
|
||||||
Register(Registry)
|
Register(Registry)
|
||||||
m.Handle("/metrics/slis", metrics.HandlerFor(Registry, metrics.HandlerOpts{}))
|
|
||||||
})
|
})
|
||||||
|
m.Handle("/metrics/slis", metrics.HandlerFor(Registry, metrics.HandlerOpts{}))
|
||||||
}
|
}
|
||||||
|
|
||||||
type SLIMetricsWithReset struct{}
|
type SLIMetricsWithReset struct{}
|
||||||
@ -48,6 +48,6 @@ type SLIMetricsWithReset struct{}
|
|||||||
func (s SLIMetricsWithReset) Install(m mux) {
|
func (s SLIMetricsWithReset) Install(m mux) {
|
||||||
installWithResetOnce.Do(func() {
|
installWithResetOnce.Do(func() {
|
||||||
Register(Registry)
|
Register(Registry)
|
||||||
m.Handle("/metrics/slis", metrics.HandlerWithReset(Registry, metrics.HandlerOpts{}))
|
|
||||||
})
|
})
|
||||||
|
m.Handle("/metrics/slis", metrics.HandlerWithReset(Registry, metrics.HandlerOpts{}))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user