Updated Diagnostics (markdown)

Jaana B. Dogan 2017-07-07 14:38:20 -07:00
parent 953e95a070
commit 7b3a30e2bf

@ -70,6 +70,16 @@ Additionally to what is provided by the runtime, Go users can create their custo
Go will soon allow users to attach [context-scoped labels](https://github.com/golang/proposal/blob/master/design/17280-profile-labels.md) to pprof records. Once profiler labels are available, it will be possible to attach user IDs, request URLs, RPC names, etc. to profiling data which later may be examined by labels. Go will soon allow users to attach [context-scoped labels](https://github.com/golang/proposal/blob/master/design/17280-profile-labels.md) to pprof records. Once profiler labels are available, it will be possible to attach user IDs, request URLs, RPC names, etc. to profiling data which later may be examined by labels.
**Can I serve the profiler handlers (/debug/proof/…) on a different path and port?**
Yes! net/http/pprof package registers its handlers to the default mux by default. But, you can also register them yourself by using the handlers exported from the package.
For example, the following example will serve the pprof.Profile handler on :7777 at /pprof/profile:
```
mux := http.NewServeMux()
mux.HandleFunc("/pprof/profile", pprof.Profile)
http.ListenAndServe(":7777", mux)
```
--- ---
To be continued with tracing, runtime stats, debugging and concurrency sections. To be continued with tracing, runtime stats, debugging and concurrency sections.