-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
When godeltaprof/http/pprof is imported we unconditionally register endpoints into a global default mux.
pyroscope-go/godeltaprof/http/pprof/pprof.go
Lines 23 to 28 in 8003d94
| func init() { | |
| prefix := routePrefix() | |
| http.HandleFunc(prefix+"/debug/pprof/delta_heap", Heap) | |
| http.HandleFunc(prefix+"/debug/pprof/delta_block", Block) | |
| http.HandleFunc(prefix+"/debug/pprof/delta_mutex", Mutex) | |
| } |
Some users may not want that or may do this only in some cases deciding at runtime.
Another problem with that approach is that the registered profilers are not configurable - if we introduce any configuration knobs to the profilers - it is impossible to pass them with the current approach.
We may consider creating a new http/pprof/v2 package that does not register to default mux and allows configuring the profilers
Metadata
Metadata
Assignees
Labels
No labels