Dmitrii Stepanov
d19ab43500
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 1m24s
DCO action / DCO (pull_request) Successful in 1m35s
Vulncheck / Vulncheck (pull_request) Successful in 2m17s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m49s
Build / Build Components (pull_request) Successful in 2m54s
Tests and linters / gopls check (pull_request) Successful in 3m5s
Tests and linters / Staticcheck (pull_request) Successful in 3m15s
Tests and linters / Lint (pull_request) Successful in 4m14s
Tests and linters / Tests (pull_request) Successful in 5m35s
Tests and linters / Tests with -race (pull_request) Successful in 5m43s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
22 lines
430 B
Go
22 lines
430 B
Go
package httputil
|
|
|
|
import (
|
|
"net/http"
|
|
"net/http/pprof"
|
|
|
|
"github.com/felixge/fgprof"
|
|
)
|
|
|
|
func init() {
|
|
http.DefaultServeMux.Handle("/debug/fgprof", fgprof.Handler())
|
|
}
|
|
|
|
// initializes pprof package in order to
|
|
// register Prometheus handlers on http.DefaultServeMux.
|
|
var _ = pprof.Handler("")
|
|
|
|
// Handler returns http.Handler for the
|
|
// Prometheus metrics collector.
|
|
func Handler() http.Handler {
|
|
return http.DefaultServeMux
|
|
}
|