mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 16:56:48 +00:00
Two fixes so gauges register in Prometheus (via StatsD) even when their initial/steady-state value is 0: 1. StatsDGaugeImpl m_dirty: default-init to true so the initial value (0) is emitted on the first flush. Previously, gauges whose value never changed from 0 were never flushed and never appeared downstream. 2. io_latency_sampler firstSample_: new atomic<bool>, init true. m_event.notify now fires when either firstSample_ is true (exchanged to false) or lastSample >= 10 ms. This guarantees the io_latency metric is registered on startup; subsequent sub-10 ms samples are still suppressed to avoid flooding.