Skip to content
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

Add a breadcrumb automatically for changes in network connectivity #448

Merged
merged 3 commits into from
Feb 18, 2020

Conversation

kattrali
Copy link
Contributor

Adds a breadcrumb each time the connection status noticeably changes, such as between no connectivity, cellular, and wifi, using the Bugsnag server URL as a proxy for overall connectivity.

Refactors the connectivity checker as a part of this change to report connectivity in a way suitable to append to reports, reduce object references and increase documentation and testing.

Copy link
Contributor

@robinmacharg robinmacharg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and makes sense. A few inline comments, mostly asking for - implicit or explicit - clarification, and a couple of general queries:

  • There's no CI testing for actual connectivity changes; is that something we could look into?
  • And it would be useful to know the anticipated impact on normal event reporting. For instance would rapid repeated connectivity changes cause other event types to be dropped? If connectivity is unstable there may not be time to send existing stored events before the next connectivity change (which may in turn may cause an app failure).
  • The choice of Bugsnag as a connectivity endpoint had no fallback and so assumes 100% uptime. Since we cache events we don't actually require 100% uptime for event reporting, but we do for connectivity breadcrumbs. Are there more "reliable" optional alternates that could be used as fallback endpoints?

@kattrali
Copy link
Contributor Author

kattrali commented Feb 7, 2020

And it would be useful to know the anticipated impact on normal event reporting. For instance would rapid repeated connectivity changes cause other event types to be dropped? If connectivity is unstable there may not be time to send existing stored events before the next connectivity change (which may in turn may cause an app failure).

This question might have been a misunderstanding - this changeset just leaves breadcrumbs for connectivity changes, no events are being generated by the event.

@kattrali kattrali force-pushed the kattrali/breadcrumb-connectivity branch from df651af to 597e79a Compare February 7, 2020 18:19
@fractalwrench fractalwrench requested review from fractalwrench and removed request for robinmacharg February 12, 2020 13:56
…iate

* Allows to callee to respond to events where the connectivity was lost
* Removes need to keep a reference to a Connectivity object, since it
  masked the fact that it required global state to function and There
  Can Only Be One.
* Peppers more documentation throughout
@kattrali kattrali force-pushed the kattrali/breadcrumb-connectivity branch from 597e79a to 9aedd59 Compare February 18, 2020 10:34
@kattrali kattrali merged commit 2379030 into spec-compliance Feb 18, 2020
@kattrali kattrali deleted the kattrali/breadcrumb-connectivity branch February 18, 2020 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants