Bug 1353645 - Record account verification status determination method telemetry. r=bsmedberg,gfritzsche,markh
authorEdouard Oger <eoger@fastmail.com>
Tue, 16 May 2017 16:59:51 -0400
changeset 409237 88d6ec3ac48c4c778a7a93f1c3d36d392f8e793d
parent 409236 8ca486c00362f505256dc235a46e618ffbd469df
child 409238 9975e1fd9faab198bc5243ee5d8cac36b30cc6c5
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)
reviewersbsmedberg, gfritzsche, markh
bugs1353645
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 1353645 - Record account verification status determination method telemetry. r=bsmedberg,gfritzsche,markh MozReview-Commit-ID: GETlknx8Fse
services/fxaccounts/FxAccounts.jsm
toolkit/components/telemetry/Scalars.yaml
--- a/services/fxaccounts/FxAccounts.jsm
+++ b/services/fxaccounts/FxAccounts.jsm
@@ -1199,16 +1199,19 @@ FxAccountsInternal.prototype = {
             .then(data => {
               // Now that the user is verified, we can proceed to fetch keys
               if (currentState.whenVerifiedDeferred) {
                 currentState.whenVerifiedDeferred.resolve(data);
                 delete currentState.whenVerifiedDeferred;
               }
               // Tell FxAccountsManager to clear its cache
               this.notifyObservers(ON_FXA_UPDATE_NOTIFICATION, ONVERIFIED_NOTIFICATION);
+              // Record how we determined the account was verified
+              Services.telemetry.scalarSet("services.sync.fxa_verification_method",
+                                           why == "push" ? "push" : "poll");
             });
         } else {
           // Poll email status again after a short delay.
           this.pollEmailStatusAgain(currentState, sessionToken);
         }
       }, error => {
         let timeoutMs = undefined;
         if (error && error.retryAfter) {
--- a/toolkit/components/telemetry/Scalars.yaml
+++ b/toolkit/components/telemetry/Scalars.yaml
@@ -262,16 +262,32 @@ storage.sync.api.usage:
     kind: uint
     keyed: true
     notification_emails:
       - eglassercamp@mozilla.com
     release_channel_collection: opt-out
     record_in_processes:
       - main
 
+services.sync:
+  fxa_verification_method:
+    bug_numbers:
+      - 1353645
+    description: >
+      The method we used ("push" or "poll") to determine the verification of a
+      Firefox Account email.
+    expires: "60"
+    kind: string
+    keyed: false
+    notification_emails:
+      - sync-staff@mozilla.com
+    release_channel_collection: opt-out
+    record_in_processes:
+      - main
+
 # The following section contains WebRTC nICEr scalars
 # For more info on ICE, see https://tools.ietf.org/html/rfc5245
 # For more info on STUN, see https://tools.ietf.org/html/rfc5389
 # For more info on TURN, see https://tools.ietf.org/html/rfc5766
 webrtc.nicer:
   stun_retransmits:
     bug_numbers:
       - 1325536