kilnfi/eth-validator-watcher

On start Prometheus metrics are set to 0

Closed this issue · 4 comments

When you start the program, watcher will expose Prometheus metrics with values set as 0.0

It will definetely skew the data on dashboards in case the script will fail and restart.

On init:

our_actual_heads_count_total 0.0
our_actual_heads_count_created 1.6977366328263304e+09
our_slashed_validators_count 0.0
total_slashed_validators_count 0.0
suboptimal_attestations_rate 0.0
slot 7.576051e+06
epoch 236751.0
our_pending_queued_validators_count 0.0
total_pending_queued_validators_count 0.0
our_active_validators_count 0.0
total_active_validators_count 0.0

After initialization:

our_actual_heads_count_total 56063.0
our_actual_heads_count_created 1.6977366328263304e+09
our_slashed_validators_count 0.0
total_slashed_validators_count 299.0
suboptimal_attestations_rate 0.0
slot 7.576128e+06
epoch 236754.0
our_pending_queued_validators_count 0.0
total_pending_queued_validators_count 0.0
our_active_validators_count 7.0
total_active_validators_count 862878.0

Code used: v0.6.0 tag.
Versions:

Python 3.9.5

See drops to zero on dashboard below:
2023-10-19_20-18

Nice catch! Will send a patch for this :)

Fixed, will be deployed in v0.7.0.

On reboot, we now see a empty space corresponding to missing data during the reboot, but no data == 0 point.

image