2021-01-29

starting a new http server or using existing one for pprof in golang

package pprof documentation says "The package is typically only imported for the side effect of registering its HTTP handlers. The handled paths all begin with /debug/pprof/."

The documentation says if you already have an http server running you don't need to start another one but if you are not using DefaultServeMux, you will have to register handlers with the mux you are using.

Shouldn't I always use a separate port for pprof? Is it okay to use the same port that I am using for prometheus metrics?



from Recent Questions - Stack Overflow https://ift.tt/36lmg0l
https://ift.tt/eA8V8J

No comments:

Post a Comment