Add API endpoint for bulk usage_data sending
Problem summary
We have usage_data/track_event
endpoint to track individual records. In some cases we'd prefer to send multiple events at the same time to reduce network overhead. For example CodeSuggestion events happen very frequently as user types in their IDE.
Instead of sending individual requests we can buffer the events at IDE level and send it to Rails once in a minute. We'll need an API endpoint which accepts bunch of events within a single request.
Proposal
Create API endpoint for accepting multiple events per request.
Payload can be validated using built-in Grape's dsl (just verification like the existing method).
For performance consideration limit the maximum amount of received event by 50. If the limit exceeded, return error with explanatory message.
Edited by Niko Belokolodov