forked from TrueCloudLab/frostfs-node
[#1602] config: Enable metrics
and profiler
services with a flag
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
12dc5c3395
commit
ac46d1a11f
16 changed files with 53 additions and 15 deletions
|
@ -9,14 +9,14 @@ import (
|
|||
)
|
||||
|
||||
func initProfiler(c *cfg) {
|
||||
addr := profilerconfig.Address(c.appCfg)
|
||||
if addr == "" {
|
||||
if !profilerconfig.Enabled(c.appCfg) {
|
||||
c.log.Info("pprof is disabled")
|
||||
return
|
||||
}
|
||||
|
||||
var prm httputil.Prm
|
||||
|
||||
prm.Address = addr
|
||||
prm.Address = profilerconfig.Address(c.appCfg)
|
||||
prm.Handler = httputil.Handler()
|
||||
|
||||
srv := httputil.New(prm,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue