stripe / veneur

A distributed, fault-tolerant pipeline for observability data
MIT License
1.73k stars 174 forks source link

simplify batching on flush to cortex sink #1022

Open mcowgill-stripe opened 1 year ago

mcowgill-stripe commented 1 year ago

Summary

This change uses a simple gofunc + channel to implement the batching logic. The break function requires a label, I did avoid using goto.

Motivation

Simplifying the code to enable the use of channel with select without a function closure.

Test plan

Updated existing tests, there is no functional change. However, the test does require one update due to the async nature changing subtly.

Rollout/monitoring/revert plan

This change can be reverted and should not change the behavior after deploy.

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.