Skip to content

Commit ae616a7

Browse files
authored
Merge pull request #173 from ramonberrutti/fix/metrics_mux
register http metrics on non default mux
2 parents a3f5173 + a71c260 commit ae616a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/metrics/metrics.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ func init() {
257257

258258
// Start starts the metrics endpoint on a new thread
259259
func Start(addr string) {
260-
http.Handle("/metrics", promhttp.Handler())
261-
go http.ListenAndServe(addr, nil)
260+
mux := http.NewServeMux()
261+
mux.Handle("/metrics", promhttp.Handler())
262+
go http.ListenAndServe(addr, mux)
262263
}

0 commit comments

Comments
 (0)