metrics-rs / metrics

A metrics ecosystem for Rust.
MIT License
1.1k stars 152 forks source link

Properly track the latest generation in `Recency` for an already-seen metric . #276

Closed tobz closed 2 years ago

tobz commented 2 years ago

This fixes an a particularly embarrassing bug with Recency, and by extension the idle timeout support in metrics-exporter-prometheus, where if a metric was seen twice, such that it has changed between the two observations, then it would effectively be locked such that it was never removed.