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
|
@ -321,9 +321,11 @@ func initCfg(path string) *cfg {
|
|||
|
||||
user.IDFromKey(&c.ownerIDFromKey, key.PrivateKey.PublicKey)
|
||||
|
||||
if metricsconfig.Address(c.appCfg) != "" {
|
||||
if metricsconfig.Enabled(c.appCfg) {
|
||||
c.metricsCollector = metrics.NewStorageMetrics()
|
||||
netState.metrics = c.metricsCollector
|
||||
} else {
|
||||
c.log.Info("prometheus metrics are disabled")
|
||||
}
|
||||
|
||||
c.onShutdown(c.clientCache.CloseAll) // clean up connections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue