-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monitoring offline not working #403
Comments
HI @thomas-cassany . Thank you for reporting this issue and providing the results of your investigation. That should help us reproduce/fix this quickly. Filed internally as 252639. |
@tanderson-ld Thanks. Is it possible to have an idea how does it prioritize? We are waiting for this change but if it takes long, we will use another approach in between. |
It is currently the 4th item in my backlog and I think will get looked at within the next week or two. |
Excellent. Thanks for the update. |
@thomas-cassany , we've been able to reproduce the issue and we see a related issue in the other direction of going from offline to online. Currently investigating potential fixes. |
@thomas-cassany, the scope of the change to fix this is larger than we expected and will take more time to evaluate the impact to other portions of the SDK. In the interest of getting you unblocked, could you describe how you are using |
Actually, we want to monitor which users have issue to get access to our features due to a problem with the LD access. We want to avoid sending the full flag list to minimise the volume of data send for monitoring. |
Is there another issue you are seeing related to customers not seeing the right flag configurations when expected? That would be a much bigger issue that we would want to investigate as at the moment we don't have any known bugs affecting evaluations of flags on iOS. The root cause of the observability API issue is as you said, but the code is not currently set up to modify the mode from that Is there another event in your application that triggers wanting to know the freshness of the flags / flag introspection? Perhaps a customer opening a support ticket? You could query the connection information at that time and record if the last failed connection time is recent since that is being properly updated when errors are encountered. Perhaps even just the difference between current time and now.
However the phone being offline would also lead to the failed connection, so this doesn't definitively prove an issue in the flagging system itself without knowing other networking information. |
Thanks @tanderson-ld I appreciate the effort and the quality to give me feedback. I was a bit short on what we want to measure in my last message. We are confident that LD is super reliable, but we know that mobile network connection is not 100% sure. We expect to have some sync issue due to VPN, network restriction or anything else. Even if it's a small percentage, we want to have a clear vision on it and then decided what to do. As you mentioned, On different note, I'll be happy to help you more on the iOS SDK evolution. |
Describe the bug
When the SDK lost the network connection, the observers registered with
observeCurrentConnectionMode
are not called.client.connectionInformation
hascurrentConnectionMode
set tostreaming
. when the network connection is lost or anySynchronizingError
except unauthorized one happens, the SDK detects the issue, updateLDClient.connectionInformation.lastConnectionFailureReason
, but never informs the observers registered withobserveCurrentConnectionMode
It's due to
ConnectionInformation.synchronizingErrorCheck
that updatesconnectionInformation
but doesn't changecurrentConnectionMode
. The switch ofcurrentConnectionMode
is needed to trigger the call to the observers. For someSynchronizingError
(maybe all),currentConnectionMode
should be set tooffline
until the connection is back. Or it can be set toestablishingStreamingConnection
, if the error is temporary.To reproduce
connectionInformation
to havecurrentConnectionMode == streaming
observeCurrentConnectionMode
not calledExpected behavior
Observer of
observeCurrentConnectionMode
called with the modeoffline
orestablishingStreamingConnection
Logs
Library version
Reproduced with the version 9.8.2.
XCode and Swift version
XCode 15.4 Swift 5
Platform the issue occurs on
Found on iPhone but likely to be all other platform too( iPad, macOS, tvOS, or watchOS)
Additional context
The text was updated successfully, but these errors were encountered: