grafana / pyroscope-go

This is the golang client integration for Pyroscope
Apache License 2.0
101 stars 18 forks source link

fix: avoid panic in init godeltaprof/http/pprof for go 1.23 #119

Closed korniltsev closed 1 month ago

korniltsev commented 1 month ago

fix https://github.com/grafana/pyroscope-go/issues/118

go 1.23 changed the way net/http/pprof registers pprof endpoints by prefixing with "GET "

This leads to panics if godeltaprof does not do the same.

https://github.com/golang/go/blob/9fcffc53593c5cd103630d0d24ef8bd91e17246d/src/net/http/pprof/pprof.go#L98-L97

https://github.com/golang/go/commit/9fcffc53593c5cd103630d0d24ef8bd91e17246d