letsencrypt / letsencrypt/boulder
Allow setting block profile rate and mutex profile rate
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 5.8k
- Forks
- 649
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 24
Description
We export some useful pprof endpoints, including /debug/mutex and /debug/block, to profile mutexes and blocking respectively: https://pkg.go.dev/net/http/pprof
However, to actually get data out of these we need to call runtime.SetMutexProfileFraction and/or runtime.SetBlockProfileRate. We should add a facility to set those. The most straightforward way would be to make these config fields for all our binaries; but it would probably be better to be able to turn these on or off live by making an HTTP request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing /debug/mutex and /debug/block pprof endpoints alongside Go's runtime.SetMutexProfileFraction and runtime.SetBlockProfileRate functions. Determine whether configuration or a live HTTP request is the intended control surface; done means both profiles can be enabled or disabled and return useful data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100