frostfs-s3-gw/cmd/gate/app-metrics.go
2020-07-09 12:28:52 +03:00

15 lines
281 B
Go

package main
import (
"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/viper"
)
func attachMetrics(v *viper.Viper, r *mux.Router) {
if !v.GetBool(cfgEnableMetrics) {
return
}
r.Handle("/metrics", promhttp.Handler())
}