Affected: Mobile SDKs
Symptoms
- Users receive the correct and expected evaluations but they do not appear in the dashboard.
- The insights for the flag(s) are also not being updated.
Cause
This can be explained by the SDK behavior. It queues up an analytic event containing the user data and sends it back to LaunchDarkly. The events are automatically flushed every 5 seconds. The method is in all LaunchDarkly SDKs, but the behavior may be different depending on the SDK.
Solution
If it’s possible, call the SDK's flush()
method to have a callback prior to your application closing. This will ensure that the events are sent before the application closes.
Although rare, if a callback is not possible prior to your application closing, then the events queued within the last 5 seconds of your application’s lifecycle will be lost.
Note: The SDK automatically flushes events every 5 seconds. Thus, it is not recommended to call flush()
excessively, as it will result in excess data usage for your end users.