From c0a54b8fc4db7e3f9619d7bb8642b6ad01cba480 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sun, 19 Jan 2025 12:27:38 -0500 Subject: cmd/anubis: expose internal API calls on the metrics server Signed-off-by: Xe Iaso --- cmd/anubis/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/anubis/main.go b/cmd/anubis/main.go index bb56bef..7d58e07 100644 --- a/cmd/anubis/main.go +++ b/cmd/anubis/main.go @@ -112,10 +112,9 @@ func main() { } func metricsServer() { - mux := http.NewServeMux() - mux.Handle("/metrics", promhttp.Handler()) + http.DefaultServeMux.Handle("/metrics", promhttp.Handler()) slog.Debug("listening for metrics", "url", "http://localhost"+*metricsBind) - log.Fatal(http.ListenAndServe(*metricsBind, mux)) + log.Fatal(http.ListenAndServe(*metricsBind, nil)) } func sha256sum(text string) (string, error) { -- cgit v1.2.3