Bug 1365204 - Add update badge histogram r=bsmedberg,rstrong
authorDoug Thayer <dothayer@mozilla.com>
Wed, 24 May 2017 09:32:01 -0700
changeset 409454 860549ef693bc8237256435f59a5986da63d97ef
parent 409453 0d668dc55c451b3014272056eb738c127374374e
child 409455 78f2a6212c535f9ee16f55d219316fff2c8b5699
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, rstrong
bugs1365204
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 1365204 - Add update badge histogram r=bsmedberg,rstrong Currently we can't differentiate between when a badge is shown and a doorhanger is shown. This creates an additional problem where if the badge progresses into a doorhanger after a window of time has passed, it registers as two notifications shown, when logically it is one. This splits out badges and doorhangers to remedy that. MozReview-Commit-ID: CTTaWDG1tah
toolkit/components/telemetry/Histograms.json
toolkit/mozapps/update/UpdateListener.jsm
--- a/toolkit/components/telemetry/Histograms.json
+++ b/toolkit/components/telemetry/Histograms.json
@@ -5815,16 +5815,26 @@
     "alert_emails": ["application-update-telemetry-alerts@mozilla.com"],
     "expires_in_version": "never",
     "kind": "categorical",
     "bug_numbers": [893505],
     "releaseChannelCollection": "opt-out",
     "description": "Update: the application update doorhanger type that was displayed.",
     "labels": ["restart", "available", "manual"]
   },
+  "UPDATE_NOTIFICATION_BADGE_SHOWN": {
+    "record_in_processes": ["main"],
+    "alert_emails": ["application-update-telemetry-alerts@mozilla.com"],
+    "expires_in_version": "never",
+    "kind": "categorical",
+    "bug_numbers": [893505, 1365204],
+    "releaseChannelCollection": "opt-out",
+    "description": "Update: the application update badge type that was displayed.",
+    "labels": ["restart", "available", "manual"]
+  },
   "UPDATE_NOTIFICATION_DISMISSED": {
     "record_in_processes": ["main", "content"],
     "alert_emails": ["application-update-telemetry-alerts@mozilla.com"],
     "expires_in_version": "never",
     "kind": "categorical",
     "bug_numbers": [893505],
     "releaseChannelCollection": "opt-out",
     "description": "Update: the dismiss action was executed for this application update doorhanger type.",
--- a/toolkit/mozapps/update/UpdateListener.jsm
+++ b/toolkit/mozapps/update/UpdateListener.jsm
@@ -96,17 +96,21 @@ var UpdateListener = {
       },
       dismiss: true
     };
 
     AppMenuNotifications.showNotification("update-" + type,
                                           action,
                                           secondaryAction,
                                           { dismissed, beforeShowDoorhanger });
-    Services.telemetry.getHistogramById("UPDATE_NOTIFICATION_SHOWN").add(type);
+    if (dismissed) {
+      Services.telemetry.getHistogramById("UPDATE_NOTIFICATION_BADGE_SHOWN").add(type);
+    } else {
+      Services.telemetry.getHistogramById("UPDATE_NOTIFICATION_SHOWN").add(type);
+    }
   },
 
   showRestartNotification(dismissed) {
     this.showUpdateNotification("restart", dismissed, () => this.requestRestart());
   },
 
   showUpdateAvailableNotification(update, dismissed) {
     this.showUpdateNotification("available", dismissed, () => {