emit-rs / emit

Developer-first diagnostics for Rust applications
https://emit-rs.io
Apache License 2.0
128 stars 2 forks source link

Support timestamp normalization in metrics #119

Closed KodrAus closed 4 weeks ago

KodrAus commented 2 months ago

When reporting metrics, it's helpful to be able to unify all samples to a standard interval, like 1 second. We could support this through the Reporter type, by adding Timestamp::align_up_to(Duration) and Timestamp::align_down_to(Duration).