Skip to content

Commit

Permalink
Expose runtime Go metrics (#3535)
Browse files Browse the repository at this point in the history
* Expose runtime Go metrics

* Replace 'promhttp' with 'expvar'
  • Loading branch information
joanlopez authored Feb 12, 2024
1 parent 42035d3 commit 4de08c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package api

import (
"context"
"expvar"
"fmt"
"net/http"
_ "net/http/pprof" //nolint:gosec // Register pprof handlers
Expand Down Expand Up @@ -42,6 +43,7 @@ func injectProfilerHandler(mux *http.ServeMux, profilingEnabled bool) {
}

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

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

0 comments on commit 4de08c3

Please sign in to comment.