simplify metrics configuration logic

This commit is contained in:
Chris Lu
2020-09-16 01:39:30 -07:00
parent be54eeb364
commit e861a6a3ab
3 changed files with 7 additions and 22 deletions

View File

@@ -98,10 +98,7 @@ func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
go vs.heartbeat()
hostAddress := fmt.Sprintf("%s:%d", ip, port)
go stats.LoopPushingMetric("volumeServer", hostAddress, stats.VolumeServerGather,
func() (addr string, intervalSeconds int) {
return vs.MetricsAddress, vs.MetricsIntervalSec
})
go stats.LoopPushingMetric("volumeServer", hostAddress, stats.VolumeServerGather, vs.MetricsAddress, vs.MetricsIntervalSec)
return vs
}