Enable profiling endpoints for kubelet

pull/6/head
Prashanth Balasubramanian 2015-06-03 23:51:14 -07:00
parent b678e2ff9e
commit 99f8ddf304
1 changed files with 5 additions and 0 deletions

View File

@ -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.