hrxi / tracing-loki

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

snappy encoding is actually not infallible #27

Open gdesmott opened 9 months ago

gdesmott commented 9 months ago

I got this crash when my app was generating lots of logs: snappy encoding is infallible: TooBig { given: 4894810188, max: 4294967295 }

According to the snappy documentation encode() can actually fail if the input is too big.

I think tracing-loki should not panic in such case but just ignore the logs. And maybe log a warning?