Skip to content

Commit

Permalink
enable pprof
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwren committed Aug 15, 2023
1 parent 956d251 commit 58e9769
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ package main
import (
"context"
"flag"
"net/http"
"net/http/pprof"
"os"
"strings"

Expand Down Expand Up @@ -138,6 +140,7 @@ func main() {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
}
mgr.AddMetricsExtraHandler("/debug/pprof/", http.HandlerFunc(pprof.Index))

Check failure on line 143 in main.go

View workflow job for this annotation

GitHub Actions / build

Error return value of `mgr.AddMetricsExtraHandler` is not checked (errcheck)

if err := certv1.AddToScheme(mgr.GetScheme()); err != nil {
setupLog.Error(err, "")
Expand Down

0 comments on commit 58e9769

Please sign in to comment.