Bug 1370111 - Set 'started' telemetry timestamp before attempting to talk to the Token Server r=nalexander
authorGrigory Kruglov <gkruglov@mozilla.com>
Mon, 05 Jun 2017 19:51:27 -0400
changeset 410880 84818c89ef9ce8734678e9f099025da3e394de18
parent 410879 c1ae34baf77ac2a747acc7a3b65a388847c12f8f
child 410881 12af2c27c2b2bb6dd55dea06f0364b564b27e26a
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1370111
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370111 - Set 'started' telemetry timestamp before attempting to talk to the Token Server r=nalexander MozReview-Commit-ID: E0vN1NY10WA
mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java
--- a/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java
+++ b/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java
@@ -419,17 +419,16 @@ public class FxAccountSyncAdapter extend
           final SyncConfiguration syncConfig = new SyncConfiguration(token.uid, authHeaderProvider, sharedPrefs, syncKeyBundle);
 
           Collection<String> knownStageNames = SyncConfiguration.validEngineNames();
           syncConfig.stagesToSync = Utils.getStagesToSyncFromBundle(knownStageNames, extras);
           syncConfig.setClusterURL(storageServerURI);
 
           globalSession = new GlobalSession(syncConfig, callback, context, clientsDataDelegate, telemetryCollector);
           telemetryCollector.setIDs(token.hashedFxaUid, clientsDataDelegate.getAccountGUID());
-          telemetryCollector.setStarted(SystemClock.elapsedRealtime());
           globalSession.start(syncDeadline);
         } catch (Exception e) {
           callback.handleError(globalSession, e);
           return;
         }
       }
 
       @Override
@@ -465,17 +464,17 @@ public class FxAccountSyncAdapter extend
         // value for token server scheduling.
         tokenBackoffHandler.setEarliestNextRequest(delay(backoffSeconds * 1000));
       }
 
       private long delay(long delay) {
         return System.currentTimeMillis() + delay;
       }
     };
-
+    telemetryCollector.setStarted(SystemClock.elapsedRealtime());
     TokenServerClient tokenServerclient = new TokenServerClient(tokenServerEndpointURI, executor);
     tokenServerclient.getTokenFromBrowserIDAssertion(assertion, true, clientState, delegate);
   }
 
   public void maybeRegisterDevice(Context context, AndroidFxAccount fxAccount) {
     // Register the device if necessary (asynchronous, in another thread).
     // As part of device registration, we obtain a PushSubscription, register our push endpoint
     // with FxA, and update account data with fxaDeviceId, which is part of our synced