-
Notifications
You must be signed in to change notification settings - Fork 18k
net/http/pprof: URL path /debug/pprof does not list all the available endpoints #24380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
/cc @hyangah |
agree that we need to extend net/http/pprof.Index to include the endpoints implemented outside runtime/pprof.Profiles, along with helpful description of endpoints. Just we need to make sure the binary format outputs have correct Content-Type headers and browsers handle them appropriately. The reason debug=1 is specified for other profiles is that it outputs in the text format. For CPU profiles or execution trace, that option is not available. |
Taking this. The "/debug/pprof" endpoint is seriously lacking in clarity. It's not even clear what the nos. in the left column stand for. |
I am thinking of revamping the page a bit. Couple of points to consider:
I will send a CL along with screenshots soon. |
Thanks! Can you clarify what you mean by "non-runtime" profile in the second bullet? |
The endpoints implemented outside runtime/pprof.Profiles. AKA, those endpoints which are exposed from net/http/pprof. |
Change https://golang.org/cl/112495 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Whatever is in the Docker image
quay.io/coreos/hyperkube:v1.8.7_coreos.0
.Here is a possibly informative entry from its
/metrics
:kubernetes_build_info{buildDate="2018-01-18T00:17:18Z",compiler="gc",gitCommit="768e049ab5230010251f30475e0e785e2e999566",gitTreeState="clean",gitVersion="v1.8.7+coreos.0",goVersion="go1.8.3",major="1",minor="8+",platform="linux/amd64"}
Does this issue reproduce with the latest release?
I think it does.
What operating system and processor architecture are you using (
go env
)?That is a Docker container image. I ran it on Ubuntu 16.04.1, on an Intel processor.
What did you do?
kubectl get --raw /debug/pprof --server https://10.233.110.91 --insecure-skip-tls-verify
What did you expect to see?
I expected to see the complete list of
<foo>
that makes for a valid path/debug/pprof/<foo>
.BTW, I can not find the complete list in any one central place. Different partial lists can be found: as shown here, in https://golang.org/pkg/net/http/pprof/ , in https://raywangblog.wordpress.com/2017/07/16/golang-profiling/ , and in https://blog.golang.org/profiling-go-programs . In another issue I finally saw a pointer to https://tip.golang.org/doc/diagnostics.html#profiling . But the full list should be in the main doc as well as what the runtime reports.
What did you see instead?
Fetching
/debug/pprof
got me the following list of choices:Astonishingly,
profile
is missing from that list! So istrace
(which is mentioned in https://golang.org/pkg/net/http/pprof/ --- which, distressingly, does not say anything about?debug=1
).The text was updated successfully, but these errors were encountered: