mirror of https://github.com/k3s-io/k3s
Enable profiling endpoints for kubelet
parent
b678e2ff9e
commit
99f8ddf304
|
@ -24,6 +24,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/http/pprof"
|
||||||
"net/url"
|
"net/url"
|
||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -146,6 +147,10 @@ func (s *Server) InstallDebuggingHandlers() {
|
||||||
s.mux.HandleFunc("/logs/", s.handleLogs)
|
s.mux.HandleFunc("/logs/", s.handleLogs)
|
||||||
s.mux.HandleFunc("/containerLogs/", s.handleContainerLogs)
|
s.mux.HandleFunc("/containerLogs/", s.handleContainerLogs)
|
||||||
s.mux.Handle("/metrics", prometheus.Handler())
|
s.mux.Handle("/metrics", prometheus.Handler())
|
||||||
|
|
||||||
|
s.mux.HandleFunc("/debug/pprof/", pprof.Index)
|
||||||
|
s.mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
|
||||||
|
s.mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
|
||||||
}
|
}
|
||||||
|
|
||||||
// error serializes an error object into an HTTP response.
|
// error serializes an error object into an HTTP response.
|
||||||
|
|
Loading…
Reference in New Issue