Skip to content
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

net/http/pprof: documentation doesn't mention some available endpoints #53971

Closed
mvdan opened this issue Jul 20, 2022 · 2 comments
Closed

net/http/pprof: documentation doesn't mention some available endpoints #53971

mvdan opened this issue Jul 20, 2022 · 2 comments
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Jul 20, 2022

Looking at https://pkg.go.dev/net/http/pprof as of Go 1.18.4, the following endpoints are documented:

  • heap
  • profile
  • block
  • mutex
  • trace

From looking at https://cs.opensource.google/go/go/+/refs/tags/go1.18.4:src/net/http/pprof/pprof.go;l=344-354, the following are seemingly undocumented:

  • allocs
  • cmdline
  • goroutine
  • threadcreate

In particular, I think the goroutine endpoint is critically underused; goroutine leaks are a fairly common source of problems in long-lived Go servers, and being able to obtain a goroutine stack dump via /debug/pprof/goroutine?debug=2 is invaluable. I've met a handful of people over the years who needed this and resorted to heavier alternatives like SIGQUIT because they weren't aware that net/http/pprof had it.

cc @cherrymui @rsc per https://dev.golang.org/owners

@mvdan mvdan added Documentation NeedsFix The path to resolution is known, but the work has not been done. labels Jul 20, 2022
@seankhliao
Copy link
Member

dup of #27737 ?

@gopherbot
Copy link

Change https://go.dev/cl/421635 mentions this issue: net/http/pprof: link docs to runtime/pprof

@dmitshur dmitshur added this to the Go1.20 milestone Aug 8, 2022
@golang golang locked and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants