add version metric (using labels) (#2711)
This commit is contained in:
parent
eb2dc5cbbb
commit
0aef63948f
|
@ -1,4 +1,3 @@
|
||||||
# beacon_chain
|
|
||||||
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
||||||
# Licensed and distributed under either of
|
# Licensed and distributed under either of
|
||||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||||
|
@ -97,6 +96,9 @@ declareGauge ticks_delay,
|
||||||
declareGauge next_action_wait,
|
declareGauge next_action_wait,
|
||||||
"Seconds until the next attestation will be sent"
|
"Seconds until the next attestation will be sent"
|
||||||
|
|
||||||
|
declareGauge versionGauge, "Nimbus version info (as metric labels)", ["version", "commit"], name = "version"
|
||||||
|
versionGauge.set(1, labelValues=[fullVersionStr, gitRevision])
|
||||||
|
|
||||||
logScope: topics = "beacnde"
|
logScope: topics = "beacnde"
|
||||||
|
|
||||||
const SlashingDbName = "slashing_protection"
|
const SlashingDbName = "slashing_protection"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# beacon_chain
|
|
||||||
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
# Copyright (c) 2018-2021 Status Research & Development GmbH
|
||||||
# Licensed and distributed under either of
|
# Licensed and distributed under either of
|
||||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||||
|
@ -22,7 +21,7 @@ const
|
||||||
|
|
||||||
gitRevision* = strip(staticExec("git rev-parse --short HEAD"))[0..5]
|
gitRevision* = strip(staticExec("git rev-parse --short HEAD"))[0..5]
|
||||||
|
|
||||||
nimBanner* = staticExec("nim --version | grep -v Compiled")
|
nimBanner* = staticExec("nim --version | grep Version")
|
||||||
|
|
||||||
versionAsStr* =
|
versionAsStr* =
|
||||||
$versionMajor & "." & $versionMinor & "." & $versionBuild
|
$versionMajor & "." & $versionMinor & "." & $versionBuild
|
||||||
|
|
Loading…
Reference in New Issue