update metrics usage

This commit is contained in:
ginuerzh
2022-07-29 21:21:39 +08:00
parent 3a409fea42
commit 85de11ae46
3 changed files with 7 additions and 7 deletions

View File

@ -122,7 +122,7 @@ func main() {
}
if cfg.Metrics != nil {
metrics.SetGlobal(xmetrics.NewMetrics())
metrics.Init(xmetrics.NewMetrics())
if cfg.Metrics.Addr != "" {
s, err := buildMetricsService(cfg.Metrics)
if err != nil {