penumbra-zone / penumbra

Penumbra is a fully private proof-of-stake network and decentralized exchange for the Cosmos ecosystem.
https://penumbra.zone
Apache License 2.0
376 stars 294 forks source link

metrics: 🔝 add an uptime counter #3912

Open cratelyn opened 7 months ago

cratelyn commented 7 months ago

a somewhat common "best practice" when operating services that expose prometheus metrics is to expose information about uptime.

we should define a counter pd_uptime_seconds, and run a thread in the background that increments the counter at a regular interval.

related to #3911.

cratelyn commented 7 months ago

NB: we have a cometbft_consensus_height metric. that metric, in tandem with this uptime counter, could be used to alert us about chain halts!

hdevalence commented 7 months ago

We might want to call this something different to disambiguate from the on-chain uptime tracking (see the Uptime proto message and its use in the staking component)