mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-02-09 09:17:28 +08:00
simplify metrics settings
This commit is contained in:
@@ -107,6 +107,10 @@ func init() {
|
||||
|
||||
func LoopPushingMetric(name, instance string, gatherer *prometheus.Registry, fnGetMetricsDest func() (addr string, intervalSeconds int)) {
|
||||
|
||||
if fnGetMetricsDest == nil {
|
||||
return
|
||||
}
|
||||
|
||||
addr, intervalSeconds := fnGetMetricsDest()
|
||||
pusher := push.New(addr, name).Gatherer(gatherer).Grouping("instance", instance)
|
||||
currentAddr := addr
|
||||
|
||||
Reference in New Issue
Block a user