Open ctenden opened 7 years ago
Would it be easier to do this on the app-side? Are you talking about storing things in an Collection if it's offline and sending the event when it comes back on?
Correct. Telemetry collected before a disconnect and during a disconnect IF the attempt is made to TRACK, is lost. Telemetry collected during a disconnect but reconnects before the TRACK is fine.
@ctenden This behavior is caused in the original implementation, I found the file responsible for the http request, but I will not be able to implement and test it in the next days. Try opening an Issue in the repository: https://github.com/Microsoft/ApplicationInsights-JS/blob/master/JavaScript/JavaScriptSDK/Sender.ts
Tracking of telemetry appears to be lost if TRACK POST is performed while network is down.
Reproduction Steps: With Network On Perform a trackEvent Wait for TRACK POST Perform a trackEvent Turn off Network Wait for TRACK POST Turn on network Perform a trackEvent Wait for TRACK POST
In Insights, only trackEvent 1 and 3 are captured.
Is it possible to use navigator.online to decide whether or not to perform TRACK POST?