feat(das): add das_sampling_head_lag metric - #5307
Conversation
Adds a gauge reporting how many headers the sampled chain head is behind the network head. Partially addresses celestiaorg#3273.
|
renaynay
left a comment
There was a problem hiding this comment.
Pls drop TestHeadLagMetricIsCollected (which is failing repeated runs) bc TestHeadLagOf already covers the only new logic
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5307 +/- ##
==========================================
- Coverage 37.52% 37.49% -0.03%
==========================================
Files 321 321
Lines 22323 22332 +9
==========================================
- Hits 8376 8374 -2
- Misses 12922 12929 +7
- Partials 1025 1029 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
done |
Partially addresses #3273.
This adds a
das_sampling_head_laggauge that shows how many headers the sampled chain head is behind the network head (NetworkHead - SampledChainHead, never below 0). It reuses the stats the metrics callback already reads, so there's no extra cost. I also added a small unit test for the calculation.I left out the time-based lag from the issue, since it needs the header timestamp at SampledChainHead. Happy to add it here or in a follow-up, whichever you prefer.