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

Telemetry events are dropped when network is disconnected #481

Open
kmadsen opened this issue Jun 5, 2020 · 0 comments
Open

Telemetry events are dropped when network is disconnected #481

kmadsen opened this issue Jun 5, 2020 · 0 comments

Comments

@kmadsen
Copy link
Contributor

kmadsen commented Jun 5, 2020

EDIT: I removed the bug label. This is potentially a feature, considering it hasn't been implemented?

Configuration

  • SDK Version All
  • Android OS Version All
  • Device model(s): All
  • App: All

Steps to Reproduce

  1. launch app with telemetry
  2. put device in airplane mode
  3. events are dropped

Expected
Don't drop network is disconnected

Logging
Looks like the queue is flushed here, which removes all the events

private synchronized void flushEnqueuedEvents() {
final List<Event> currentEvents = queue.flush();
if (currentEvents.isEmpty()) {
return;
}
executeRunnable(new Runnable() {
@Override
public void run() {
try {
sendEvents(currentEvents, false);
} catch (Throwable throwable) {
// TODO: log silent crash
Log.e(LOG_TAG, throwable.toString());
}
}
});
}

When the connection is unavailable, these events are dropped

private synchronized void sendEvents(List<Event> events, boolean serializeNulls) {
if (isNetworkConnected() && checkRequiredParameters(sAccessToken.get(), userAgent)) {
telemetryClient.sendEvents(events, httpCallback, serializeNulls);
}
}

@kmadsen kmadsen added bug and removed bug labels Jun 5, 2020
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

No branches or pull requests

1 participant