The Problem
There are two built-in output metrics output_sent and output_batch_sent that show how many messages and message batches have been sent by the output component. Showing the differences is important especially when using an aggreator processor like archive. However, this is not doable when implementing a processor like archive with the bethos library, because this relies on the WithCollapsedCount (or CtxWithCollapsedCount), and these functions are all in the internal package.
The Proposal
There are two simple solutions:
- move the whole
internal/batch/count.go to public/service, or
- only expose the
WithCollapsedCount to the public/service package.
Solution 2 is probably the better option because it only exposes the very limited interface needed for plugin development.
The Problem
There are two built-in output metrics
output_sentandoutput_batch_sentthat show how many messages and message batches have been sent by the output component. Showing the differences is important especially when using an aggreator processor likearchive. However, this is not doable when implementing a processor likearchivewith the bethos library, because this relies on theWithCollapsedCount(orCtxWithCollapsedCount), and these functions are all in theinternalpackage.The Proposal
There are two simple solutions:
internal/batch/count.gotopublic/service, orWithCollapsedCountto thepublic/servicepackage.Solution 2 is probably the better option because it only exposes the very limited interface needed for plugin development.