Affected: JavaScript-based 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. For example, in the JavaScript (client-side) SDK, flush()
is an async method.
For example, some browsers don't allow sending network requests after navigating away from a page which can prevent the sending of events that were queued recently.
Solution
If possible, call the SDKs flush()
method prior to executing a redirect. This will ensure that the flush()
method is called during a period when the browser will allow it.
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.