mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
save (#3662)
This commit is contained in:
parent
e10506c933
commit
a6577679d5
@ -241,6 +241,7 @@ func StartPProf(address string, withMetrics bool) {
|
||||
// from the registry into expvar, and execute regular expvar handler.
|
||||
if withMetrics {
|
||||
http.HandleFunc("/debug/metrics/prometheus", func(w http.ResponseWriter, req *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
metrics2.WritePrometheus(w, true)
|
||||
})
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ func ExpHandler(r metrics.Registry) http.Handler {
|
||||
// This function enables metrics reporting separate from pprof.
|
||||
func Setup(address string) {
|
||||
http.HandleFunc("/debug/metrics/prometheus", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
metrics2.WritePrometheus(w, true)
|
||||
})
|
||||
//m.Handle("/debug/metrics", ExpHandler(metrics.DefaultRegistry))
|
||||
|
Loading…
Reference in New Issue
Block a user