Skip to content

Commit ea89bf0

Browse files
authored
Merge pull request #751 from aldudko/metrics
Move server metrics to health port
2 parents 164763c + 487279d commit ea89bf0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/server/app/server.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ func (p *Proxy) runAgentServer(o *options.ProxyRunOptions, server *server.ProxyS
422422

423423
func (p *Proxy) runAdminServer(o *options.ProxyRunOptions, _ *server.ProxyServer) error {
424424
muxHandler := http.NewServeMux()
425+
// /metrics moved to HealthServer but being maintained here for backward compatibility
425426
muxHandler.Handle("/metrics", promhttp.Handler())
426427
if o.EnableProfiling {
427428
muxHandler.HandleFunc("/debug/pprof", util.RedirectTo("/debug/pprof/"))
@@ -471,6 +472,7 @@ func (p *Proxy) runHealthServer(o *options.ProxyRunOptions, server *server.Proxy
471472
})
472473

473474
muxHandler := http.NewServeMux()
475+
muxHandler.Handle("/metrics", promhttp.Handler())
474476
muxHandler.HandleFunc("/healthz", livenessHandler)
475477
// "/ready" is deprecated but being maintained for backward compatibility
476478
muxHandler.HandleFunc("/ready", readinessHandler)

0 commit comments

Comments
 (0)