You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
We struggled for quite a while trying to understand why we were missing events in our Segment instance and other cloud destinations while seeing the events in device-mode destinations. Turns out it was because the person who implemented the upgrade from Segment Android to Segment Kotlin inadvertently set the flushInterval to 0. As you can see here, the Segment SDK dropped a bunch of events because of that.
Describe the solution you'd like
Would recommend throwing a warning when flushInterval is set to a value < 1
Describe alternatives you've considered
Update the documentation to describe what will happen if flushInterval is set to 0. Logically, you could say that if the flush interval is 0, then it'll attempt to flush whenever it has events in the queue.
The text was updated successfully, but these errors were encountered:
hi @toddgower-hiatus, thanks for bring this to our attention. I agree we should at least have some comments on the class to explain the behaviors of different parameters. will have them added.
just a bit explanation on the behavior of flushInterval <= 0:
the events are not dropped. it's still in the disk waiting for next flush to happen. a manual flush or a mix use of a different policy would trigger the uploads.
though logically it sounds like the policy should flush per event, implementation-wise that means a thread is occupied by a infinite loop doing nothing. if flush at a per event basis is wanted, use the count based policy instead or use a mixture of the two or customize a policy to the desire the behavior.
@wenxi-zeng yes, understand your point about a flushInterval of 0 not flushing every event. I'm just trying to help someone else avoid this issue that plagued our analytics for several weeks. We have many single-use users that were never hitting the batch size limit in their single visit and, as a result, weren't ever triggering a flush. These users were "anayltics-invisible"
Is your feature request related to a problem? Please describe.
We struggled for quite a while trying to understand why we were missing events in our Segment instance and other cloud destinations while seeing the events in device-mode destinations. Turns out it was because the person who implemented the upgrade from Segment Android to Segment Kotlin inadvertently set the
flushInterval
to 0. As you can see here, the Segment SDK dropped a bunch of events because of that.Describe the solution you'd like
Would recommend throwing a warning when
flushInterval
is set to a value < 1Describe alternatives you've considered
Update the documentation to describe what will happen if
flushInterval
is set to 0. Logically, you could say that if the flush interval is 0, then it'll attempt to flush whenever it has events in the queue.The text was updated successfully, but these errors were encountered: