-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Hi @mia-0032
Firstly thanks for your work on this plugin - we've been using it at GoCardless with great success for some time now.
We've recently developed a new feature for this plugin, that batches as many messages up as it can within the flush_interval, then compresses these with Zlib and sends them via a single Pub/Sub message, with an attribute set on it to indicate that it contains a compressed batch of messages.
The implementation for this can be found in this PR.
Given that we can easily achieve a 90% compression ratio, and that we're sending upwards of 10TiB of logs over Pub/Sub each month, this results in significant cost savings while still maintaining decoupling between the sender and receiver. We've been running this code for a couple of weeks now without any issues.
We'd like to contribute this piece of work upstream to your repository. But before we do that, I wanted to check with you whether this is something that you'd accept, and what's the easiest way of us doing this for you? The PR consists of a few main pieces:
- Adding Rubocop configuration, and fixing up any violations (we use Rubocop heavily at GoCardless, and find it makes it easier to keep the codebase consistent. We'd be happy to adjust the rules if there's any that you object to)
- Adding Prometheus metrics around the existing operations (this gives us a better view of the performance of the plugin)
- Adding the
compress_batchesfeature (this also adds some more Prometheus metrics, related to compression)
For us, it would be ideal if we could get all of these changes merged back in to your upstream, to make any future features easy to develop without having a large divergence of the fork.
Which of these commits would you be willing for us to submit as a PR, and in what format: one PR per commit, or one PR with all of the commits? Also would there be any changes you'd like up-front before we open a PR?
Thanks!