There's a chance that when the spans are being converted to kafka messages, they will still be over 1MiB since the log events in the span are not cured. We fix this by removing half the log messages but maintain the distribution over time of the messages i.e in every pass drop the odd-indexed logs effectively retaining half of them.
Testing
Unit tests
Checklist:
[ ✅ ] My changes generate no new warnings
[✅ ] I have added tests that prove my fix is effective or that my feature works
[✅ ] Any dependent changes have been merged and published in downstream modules
Description
There's a chance that when the spans are being converted to kafka messages, they will still be over 1MiB since the log events in the span are not cured. We fix this by removing half the log messages but maintain the distribution over time of the messages i.e in every pass drop the odd-indexed logs effectively retaining half of them.
Testing
Unit tests
Checklist: