From 4e6db1cf911a9a2e5e4f6d1efdd3c0babc4b2449 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Fri, 19 Apr 2024 22:07:07 +0000 Subject: [PATCH 1/2] Fix the stringify of quorumID --- node/metrics.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/node/metrics.go b/node/metrics.go index ce7fef5e9c..ad91855c84 100644 --- a/node/metrics.go +++ b/node/metrics.go @@ -2,6 +2,7 @@ package node import ( "context" + "fmt" "math/big" "sort" "strconv" @@ -216,8 +217,8 @@ func (g *Metrics) collectOnchainMetrics() { }) for i, op := range operatorStakeShares { if op.operatorId == g.operatorId { - g.RegisteredQuorums.WithLabelValues(string(q), "stake_share").Set(op.stakeShare) - g.RegisteredQuorums.WithLabelValues(string(q), "rank").Set(float64(i + 1)) + g.RegisteredQuorums.WithLabelValues(fmt.Sprintf("%d", q), "stake_share").Set(op.stakeShare) + g.RegisteredQuorums.WithLabelValues(fmt.Sprintf("%d", q), "rank").Set(float64(i + 1)) g.logger.Info("Current operator registration onchain", "operatorId", g.operatorId.Hex(), "blockNumber", blockNum, "quorumId", q, "stakeShare (basis point)", op.stakeShare, "rank", i+1) break } From 4f039aeee9836dbb0df9ab732cd7d393fce379a2 Mon Sep 17 00:00:00 2001 From: Jian Xiao Date: Fri, 19 Apr 2024 22:26:02 +0000 Subject: [PATCH 2/2] fix metric name --- node/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/metrics.go b/node/metrics.go index ad91855c84..a03aa3f1df 100644 --- a/node/metrics.go +++ b/node/metrics.go @@ -64,7 +64,7 @@ func NewMetrics(eigenMetrics eigenmetrics.Metrics, reg *prometheus.Registry, log RegisteredQuorums: promauto.With(reg).NewGaugeVec( prometheus.GaugeOpts{ Namespace: Namespace, - Name: "registered", + Name: "registered_quorums", Help: "the quorums the DA node is registered", }, []string{"quorum", "type"},