Need to re-generate the new internal metrics, but it is too much code to change,
so will move this to dataold (was internal anyway, so no public breaking change).
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
The order in which Consume* and Shutdown get handled for batch processor is inconsistent when called back to back. This results in the number of items getting passed through to be inconsistent. To unblock tests and maintain coverage, the tests only check if some data got through and the batching size is 1.
Issue #1070 has been opened to properly fix the test and ensure the total number of items sent is accounted for after shutdown has been invoked.
**Link to tracking Issue:** Fixes issue #1066 and #1069
**Testing:** Run each of the test 100 times and no test failures.
Elapsed time measurement was set incorrectly. Timeout to compare elapsed time against is triggered with newBatchProcessor, move it below the timer start.
New internal data structure allows to batch together traces from different resources. This simplify batching a lot. This commit removes most of the functionality for handling many batches per node and uses only one batch with one ticker.