Skip to content

Commit

Permalink
fix(zetaclient): use name in pending tx metric (zeta-chain#2642)
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera authored Aug 6, 2024
1 parent 72bf8ad commit 6a6eee6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions zetaclient/context/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ func (c Chain) ID() int64 {
return c.chainInfo.ChainId
}

func (c Chain) Name() string {
return c.chainInfo.Name
}

func (c Chain) Params() *observer.ChainParams {
return c.observerParams
}
Expand Down
2 changes: 1 addition & 1 deletion zetaclient/orchestrator/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ func (oc *Orchestrator) runScheduler(ctx context.Context) error {
cctxList := cctxMap[chainID]

metrics.PendingTxsPerChain.
WithLabelValues(fmt.Sprintf("chain_%d", chainID)).
WithLabelValues(chain.Name()).
Set(float64(len(cctxList)))

if len(cctxList) == 0 {
Expand Down

0 comments on commit 6a6eee6

Please sign in to comment.