-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use /1/batch/<dataset> endpoint (#16)
pretty simple pair of changes masked with a lot of additional churn. Adds a class called BatchEndpointAggregator to transmission.js that groups events based on apiHost/writekey/datasetname. It does manual JSON encoding to not double encode event post data (which is already JSON.stringifyed before making it to transmission) The Transmission#_sendBatch method is where the other part of the change is. Once a batch of events is chosen (through timeout or event count triggers), it's aggregated. Then we create a promise to send each batch endpoint aggregated list of events. The bulk of the test changes are to deal with the fact that with the batch endpoint supported, we get multiple responses at once.
- Loading branch information
Showing
4 changed files
with
318 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.