This is an automated email from the ASF dual-hosted git repository.

littlecui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-service-center.git


The following commit(s) were added to refs/heads/master by this push:
     new 633cb2b  Bug fix: syncer peer metrics are not correct (#1284)
633cb2b is described below

commit 633cb2b23769334662e64ec5944a0c8df768ca30
Author: little-cui <[email protected]>
AuthorDate: Fri Mar 4 14:23:16 2022 +0800

    Bug fix: syncer peer metrics are not correct (#1284)
---
 syncer/service/admin/health.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/syncer/service/admin/health.go b/syncer/service/admin/health.go
index cfd5d85..1068a29 100644
--- a/syncer/service/admin/health.go
+++ b/syncer/service/admin/health.go
@@ -137,8 +137,8 @@ func reportMetrics(peers []*Peer) {
                }
        }
 
-       metrics.ConnectedPeersSet(int64(len(peers)))
-       metrics.PeersTotalSet(connectPeersCount)
+       metrics.PeersTotalSet(int64(len(peers)))
+       metrics.ConnectedPeersSet(connectPeersCount)
 }
 
 func newRPCConn(endpoints []string) (*grpc.ClientConn, error) {

Reply via email to