Skip to content

Commit

Permalink
enable expvar
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Jul 13, 2023
1 parent 0bbe544 commit acf7208
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/flags_misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"context"
"expvar"
"fmt"
"net/http"
"net/http/pprof"
Expand Down Expand Up @@ -170,6 +171,7 @@ func ParseMiscFlags(ctx context.Context, cmd *cobra.Command) (context.Context, e
mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
mux.Handle("/debug/vars", expvar.Handler())
err := http.ListenAndServe("0.0.0.0:6000", mux) //nolint:gosec
if err != nil {
log.Fatalw("failed to start pprof server", "err", err)
Expand Down

0 comments on commit acf7208

Please sign in to comment.