Skip to content

Commit bbbee38

Browse files
richabankerk8s-publishing-bot
authored andcommitted
do not install handler for /metrics/slis using sync.Once
Kubernetes-commit: 93a63da852c7852723cc37a83a4bd0b11242ea43
1 parent 6332889 commit bbbee38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

metrics/prometheus/slis/routes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ type SLIMetrics struct{}
3838
func (s SLIMetrics) Install(m mux) {
3939
installOnce.Do(func() {
4040
Register(Registry)
41-
m.Handle("/metrics/slis", metrics.HandlerFor(Registry, metrics.HandlerOpts{}))
4241
})
42+
m.Handle("/metrics/slis", metrics.HandlerFor(Registry, metrics.HandlerOpts{}))
4343
}
4444

4545
type SLIMetricsWithReset struct{}
@@ -48,6 +48,6 @@ type SLIMetricsWithReset struct{}
4848
func (s SLIMetricsWithReset) Install(m mux) {
4949
installWithResetOnce.Do(func() {
5050
Register(Registry)
51-
m.Handle("/metrics/slis", metrics.HandlerWithReset(Registry, metrics.HandlerOpts{}))
5251
})
52+
m.Handle("/metrics/slis", metrics.HandlerWithReset(Registry, metrics.HandlerOpts{}))
5353
}

0 commit comments

Comments
 (0)