Skip to content

Commit

Permalink
Replace 'promhttp' with 'expvar'
Browse files Browse the repository at this point in the history
  • Loading branch information
joanlopez committed Feb 12, 2024
1 parent 4bcbc13 commit 8b9a53a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ package api

import (
"context"
"expvar"
"fmt"
"net/http"
_ "net/http/pprof" //nolint:gosec // Register pprof handlers
"time"

"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sirupsen/logrus"

v1 "go.k6.io/k6/api/v1"
Expand Down Expand Up @@ -43,7 +43,8 @@ func injectProfilerHandler(mux *http.ServeMux, profilingEnabled bool) {
}

mux.Handle("/debug/pprof/", handler)
mux.Handle("/metrics", promhttp.Handler())
mux.Handle("/debug/vars/", expvar.Handler())

Check failure on line 47 in api/server.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
}

// GetServer returns a http.Server instance that can serve k6's REST API.
Expand Down

0 comments on commit 8b9a53a

Please sign in to comment.