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

feat: add chainName for clientExpiry #33

Merged
merged 3 commits into from
Jan 12, 2024
Merged
Changes from 1 commit
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
12 changes: 9 additions & 3 deletions pkg/collector/ibc_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ var (
"Returns light client expiry in unixtime.",
[]string{
"host_chain_id",
"client_id",
"target_chain_id",
"src_chain_name",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bit inconsistency with host_chain_id and src_chain_name, maybe better to change also host_chain_id -> src_chain_id and target_chain_id -> dst_chain_id?
Also docs with metrics samples needs to be updated if we adding new labels.

"dst_chain_name",
"client_id",
"discord_ids",
"status",
},
Expand Down Expand Up @@ -93,8 +95,10 @@ func (cc IBCCollector) Collect(ch chan<- prometheus.Metric) {
float64(ci.ChainAClientExpiration.Unix()),
[]string{
(*cc.RPCs)[path.Chain1.ChainName].ChainID,
path.Chain1.ClientID,
(*cc.RPCs)[path.Chain2.ChainName].ChainID,
path.Chain1.ChainName,
path.Chain2.ChainName,
path.Chain1.ClientID,
discordIDs,
status,
}...,
Expand All @@ -106,8 +110,10 @@ func (cc IBCCollector) Collect(ch chan<- prometheus.Metric) {
float64(ci.ChainBClientExpiration.Unix()),
[]string{
(*cc.RPCs)[path.Chain2.ChainName].ChainID,
path.Chain2.ClientID,
(*cc.RPCs)[path.Chain1.ChainName].ChainID,
path.Chain2.ChainName,
path.Chain1.ChainName,
path.Chain2.ClientID,
discordIDs,
status,
}...,
Expand Down