frostfs-node/cmd/frostfs-ir/metrics.go
Anton Nikiforov 800eb5e983
All checks were successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/push/pre-commit Pipeline was successful
[#125] ir: Reconfigure pprof and metrics on SIGHUP
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2023-05-11 12:38:34 +03:00

21 lines
553 B
Go

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(),
}
}