snowplow / snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
http://snowplowanalytics.com
Apache License 2.0
107 stars 63 forks source link

Add some BuffferEventNumber or BufferTime before sent the events #643

Open robertossan opened 9 months ago

robertossan commented 9 months ago

Is your feature request related to a problem? Please describe. Right now, every time an event is tracked in the SnowPlow tracker, this event is saved in the Snowplow database and sent immediately, and there is no option to accumulate some events (25/50/100 events) or wait some time (30/60 seconds) before the sending occurs. It would be interesting to have this functionality, to try to reduce the network traffic that is generated

Describe the solution you'd like It should be nice if we have some fiiled on the EmitterConfiguration, like:

EmitterConfiguration().setBufferTimeout(<Int>)
EmitterConfiguration().setBufferEvents(<int>)

So, in that way, the emitter just emit every X seconds(sending the events on the database) or waiting until there are N events on the database, before emit the snowplow events.

Describe alternatives you've considered We try to modify the BufferOption, but this is just working in case there are many events in the database for any other reason(e.g. if the network had been down), but not if has been required:

https://docs.snowplow.io/docs/collecting-data/collecting-from-own-applications/mobile-trackers/configuring-how-events-are-sent/?platform=android#configuring-how-many-events-to-send-in-one-request

matus-tomlein commented 9 months ago

Thanks for the suggestion @robertossan! We plan to rework the batching mechanism for the v6 version of the tracker and we will keep this in mind.

robertossan commented 9 months ago

Good to know @matus-tomlein ; thanks in advance.

Just to be informed, is there any release date for this v6?? or it's just something that will happens in some point in the future