romanz / electrs

An efficient re-implementation of Electrum Server in Rust
MIT License
1.02k stars 373 forks source link

Add main loop prometheus gauge #1041

Closed philippem closed 1 month ago

philippem commented 1 month ago

This commit adds a prometheus gauge that is incremented with each iteration of the electrs main loop. It can be used as a proxy for liveness of the electrs main thread. The main thread sleeps for 5 seconds or until a SIGUSR1 interrupt is handled. The main thread is also responsible for retrieving new block information from its chain daemon, and during this time the gauge will not be incremented.