May 2019
Intermediate to advanced
442 pages
11h 36m
English
The Prometheus server, like most serious software written in Go, is instrumented using a package from the standard library named pprof, which provides runtime profiling information using a specific format. The files produced in this format can then be read by a command-line tool with the same name (pprof), which uses them to generate reports and visualizations of the profiling data. promtool offers the debug pprof subcommand, which we can see in action in the following snippet:
vagrant@prometheus:~$ promtool debug pprof 'http://prometheus:9090'collecting: http://prometheus:9090/debug/pprof/profile?seconds=30collecting: http://prometheus:9090/debug/pprof/blockcollecting: http://prometheus:9090/debug/pprof/goroutinecollecting: http://prometheus:9090/debug/pprof/heap ...
Read now
Unlock full access