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
Currently for browser offline caching support there is the Offline integration which has a number of issues:
It does not cater for events that fail to send due to network issues
Browser navigator.onLine does not offer a reliable way to determine if the machine is connected to the internet. It only tells you that the machine is connected to a network.
For example, on Windows, the Docker virtual network adaptor means that onLine is always true 😭
Multiple passes through integrations and event processors opens up a lot of issues and confusion
Solution Brainstorm
It makes more sense for offline support to act at the transport interface so it can catch send failures. Since the transports have recently been re-written in v7 with a functional approach this has become simpler.
The issue with wrapping Transport directly is that send doesn't pass through rate limit responses so there is no way to wrap that directly and retry for those failures:
To get around this current limitation, the Electron SDK offline transport wraps the default TransportRequestExecutor and adds offline persisting. This allows us to queue and retry events that have failed due to rate limit errors.
Is this desired in the browser? Should we be retying rate-limited requests?
We could change send to this without it being a breaking change (#6626):
Then all the existing transports can pass through the response.
Another solution would be to add a new function although this won't currently be able to wrap the existing transports because they don't expose/export their TransportRequestExecutor implementations:
Uh oh!
There was an error while loading. Please reload this page.
Problem Statement
Currently for browser offline caching support there is the
Offline
integration which has a number of issues:navigator.onLine
does not offer a reliable way to determine if the machine is connected to the internet. It only tells you that the machine is connected to a network.onLine
is alwaystrue
😭hub.captureEvent()
this results in another pass through the integrations which triggers theDedupe
integration Can't get Offline integration to work #3046 (comment).Solution Brainstorm
It makes more sense for offline support to act at the transport interface so it can catch send failures. Since the transports have recently been re-written in v7 with a functional approach this has become simpler.
Additionally allow the backing store to be configurable:
The issue with wrapping
Transport
directly is thatsend
doesn't pass through rate limit responses so there is no way to wrap that directly and retry for those failures:To get around this current limitation, the Electron SDK offline transport wraps the default
TransportRequestExecutor
and adds offline persisting. This allows us to queue and retry events that have failed due to rate limit errors.Is this desired in the browser? Should we be retying rate-limited requests?
We could change
send
to this without it being a breaking change (#6626):Then all the existing transports can pass through the response.
Another solution would be to add a new function although this won't currently be able to wrap the existing transports because they don't expose/export their
TransportRequestExecutor
implementations:The text was updated successfully, but these errors were encountered: