From 503cba0b4cc536819eb11cc332e919b097d72980 Mon Sep 17 00:00:00 2001 From: Gerrit Date: Thu, 7 Apr 2022 12:59:01 +0200 Subject: [PATCH] Debugging: Take out metrics filter. --- cmd/metal-api/main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/metal-api/main.go b/cmd/metal-api/main.go index 44945f4bc..1afcdb742 100644 --- a/cmd/metal-api/main.go +++ b/cmd/metal-api/main.go @@ -20,7 +20,6 @@ import ( "github.com/go-logr/zapr" "github.com/metal-stack/metal-api/cmd/metal-api/internal/grpc" - "github.com/metal-stack/metal-api/cmd/metal-api/internal/metrics" "github.com/metal-stack/metal-lib/rest" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -84,7 +83,7 @@ var rootCmd = &cobra.Command{ SilenceErrors: true, RunE: func(cmd *cobra.Command, args []string) error { initLogging() - initMetrics() + // initMetrics() var opts []dsConnectOpt if viper.GetBool("init-data-store") { @@ -310,7 +309,7 @@ func initLogging() { debug = logger.Desugar().Core().Enabled(zap.DebugLevel) } -func initMetrics() { +func initMetrics() { //nolint logger.Info("starting metrics endpoint") metricsServer := http.NewServeMux() metricsServer.Handle("/metrics", promhttp.Handler()) @@ -726,7 +725,7 @@ func initRestServices(withauth bool) *restfulspec.Config { restful.DefaultContainer.Add(healthService) restful.DefaultContainer.Add(rest.NewVersion(moduleName, service.BasePath)) restful.DefaultContainer.Filter(rest.RequestLogger(debug, lg)) - restful.DefaultContainer.Filter(metrics.RestfulMetrics) + // restful.DefaultContainer.Filter(metrics.RestfulMetrics) if withauth { restful.DefaultContainer.Filter(rest.UserAuth(userGetter))