Merge pull request #833 from weaveworks/832-i-broke-pprof

Loop in the http.DefaultServeMux for pprof.
This commit is contained in:
Tom Wilkie
2016-01-19 09:35:45 -08:00

View File

@@ -84,6 +84,9 @@ func TopologyHandler(c Reporter, preRoutes *mux.Router, postRoutes http.Handler)
topologyRegistry.captureRenderer(c, handleWs)) // NB not gzip!
get.HandleFunc("/api/report", gzipHandler(makeRawReportHandler(c)))
// We pull in the http.DefaultServeMux to get the pprof routes
preRoutes.PathPrefix("/debug/pprof").Handler(http.DefaultServeMux)
if postRoutes != nil {
preRoutes.PathPrefix("/").Handler(postRoutes)
}