[#125] ir: Reconfigure pprof and metrics on SIGHUP

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-04-26 15:45:57 +03:00
parent a181c9e434
commit 800eb5e983
9 changed files with 154 additions and 80 deletions

21
cmd/frostfs-ir/metrics.go Normal file
View file

@ -0,0 +1,21 @@
package main
import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/metrics"
)
const (
prometheusEnabledKey = "prometheus.enabled"
prometheusAddressKey = "prometheus.address"
prometheusShutdownTimeoutKey = "prometheus.shutdown_timeout"
)
func newMetricsComponent() *httpComponent {
return &httpComponent{
name: "prometheus",
enabledKey: prometheusEnabledKey,
addressKey: prometheusAddressKey,
shutdownTimeoutKey: prometheusShutdownTimeoutKey,
handler: metrics.Handler(),
}
}