From 6db982c6bb601e2df986c513c83a914a3967a437 Mon Sep 17 00:00:00 2001 From: Patryk Kwiatek Date: Wed, 26 Jun 2024 14:37:51 +0200 Subject: [PATCH] wip --- internal/util/debug/debug.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/util/debug/debug.go b/internal/util/debug/debug.go index a15581e89e59..ce5d832b02bd 100644 --- a/internal/util/debug/debug.go +++ b/internal/util/debug/debug.go @@ -56,10 +56,10 @@ func RunHandler(ctx context.Context, addr string, r prometheus.Registerer, l *za } must.NoError(statsviz.Register(http.DefaultServeMux, opts...)) - http.HandleFunc("/debug/started", func(r http.ResponseWriter, _ *http.Request) { + http.Handle("/debug/started", promhttp.InstrumentMetricHandler(r, http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { // TODO https://github.com/FerretDB/FerretDB/issues/4306 - r.WriteHeader(http.StatusOK) - }) + rw.WriteHeader(http.StatusOK) + }))) // healthz handler, which is used for liveness probe, returns StatusOK when reached. // This ensures that listener is running.