Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zetaclient): use name in pending tx metric #2642

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
return c.chainInfo.ChainId
}

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

Check warning on line 136 in zetaclient/context/chain.go

View check run for this annotation

Codecov / codecov/patch

zetaclient/context/chain.go#L135-L136

Added lines #L135 - L136 were not covered by tests
}
gartnera marked this conversation as resolved.
Show resolved Hide resolved

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 @@ -375,7 +375,7 @@
cctxList := cctxMap[chainID]

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

Check warning on line 378 in zetaclient/orchestrator/orchestrator.go

View check run for this annotation

Codecov / codecov/patch

zetaclient/orchestrator/orchestrator.go#L378

Added line #L378 was not covered by tests
gartnera marked this conversation as resolved.
Show resolved Hide resolved
Set(float64(len(cctxList)))

if len(cctxList) == 0 {
Expand Down
Loading