Skip to content

Commit

Permalink
solution: add upstream height metric
Browse files Browse the repository at this point in the history
  • Loading branch information
kanazirsky committed May 9, 2024
1 parent c9e760c commit 8076c81
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ abstract class Multistream(
) {
it.getLag().toDouble()
}
Metrics.gauge(
"$metrics.height",
listOf(Tag.of("chain", chain.chainCode), Tag.of("upstream", upstream.getId())), upstream
) {
it.getHead().getCurrentHeight()?.toDouble() ?: 0.0
}
}

open fun init() {
Expand Down

0 comments on commit 8076c81

Please sign in to comment.