File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,14 @@ func RunServer(ctx *cli.Context) error {
20
20
ctx .WriteString ("/metrics" )
21
21
})
22
22
r .GET ("/metrics" , prometheusHandler ())
23
- r .GET ("/debug/pprof/" , pprofHandlerIndex )
24
- r .GET ("/debug/pprof/cmdline" , pprofHandlerCmdline )
25
- r .GET ("/debug/pprof/profile" , pprofHandlerIndex )
26
- r .GET ("/debug/pprof/trace" , pprofHandlerTrace )
27
- r .GET ("/debug/pprof/{profile}" , pprofHandlerIndex )
23
+
24
+ if config .Debug {
25
+ r .GET ("/debug/pprof/" , pprofHandlerIndex )
26
+ r .GET ("/debug/pprof/cmdline" , pprofHandlerCmdline )
27
+ r .GET ("/debug/pprof/profile" , pprofHandlerIndex )
28
+ r .GET ("/debug/pprof/trace" , pprofHandlerTrace )
29
+ r .GET ("/debug/pprof/{profile}" , pprofHandlerIndex )
30
+ }
28
31
29
32
log .Print ("exporter listening on 0.0.0.0:" + strconv .Itoa (config .Port ))
30
33
return fasthttp .ListenAndServe (":" + strconv .Itoa (config .Port ), r .Handler )
You can’t perform that action at this time.
0 commit comments