You don’t want to clutter up your computer with Docker, Prometheus, Grafana or even K8S just to monitor a Go app's heap size, right?
Use live-pprof
to Monitor a Go app's performance. It launches in seconds, boosting your local development.
live-pprof-HD.1080p.mov
go install github.com/moderato-app/live-pprof@v1
package main
import (
"log"
"net/http"
_ "net/http/pprof"
)
func main() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}
live-pprof 6060
# Or:
live-pprof http://localhost:6060/debug/pprof
# Both commands will monitor http://localhost:6060/debug/pprof
- Metrics data is stored in the browser memory and is cleared on page refresh.
- The page slows down as data grows due to charts rendering.
As you can see, live-pprof is mainly for local development. These limitations mean it’s not a replacement for Prometheus and Grafana.
Thanks to Golang Weekly for the shoutout!