Skip to content

Commit

Permalink
Debugging: Take out metrics filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Apr 7, 2022
1 parent 4885c78 commit 503cba0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/metal-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 503cba0

Please sign in to comment.