hrxi / tracing-loki

A tracing layer for shipping logs to Grafana Loki
Apache License 2.0
43 stars 20 forks source link

panic on overflow while attempting multiplication #29

Open dam5h opened 2 weeks ago

dam5h commented 2 weeks ago

Love this library, its been great for us, thank you!

We did get the following panic in production (as a result of no internet connection)

panicked at "attempt to multiply with overflow", C:\Users\runneradmin/.cargo\registry\src\index.crates.io-6f17d22bba15001f\tracing-loki-0.2.5\src\lib.rs:495:35

We do use overflow-checks = true in our release profile.

I can open a PR to address this using a saturating shift, if that works for you?