Splits batches of events larger than 4.5MB into multiple requests in order to stay under the 5MB API limit.
Introduces a Batcher component which builds batches and counts the size of the resulting request body. The offer method returns true if the event is accepted as a part of the current batch or false if the event would make the batch too large. drain_and_serialize returns a JSON string request body for export and clears the array.
Fixes #30
Splits batches of events larger than 4.5MB into multiple requests in order to stay under the 5MB API limit.
Introduces a
Batcher
component which builds batches and counts the size of the resulting request body. Theoffer
method returnstrue
if the event is accepted as a part of the current batch orfalse
if the event would make the batch too large.drain_and_serialize
returns a JSON string request body for export and clears the array.