Bug 1544911 - Enable the 'prio' ping on Beta r=janerik
authorChris H-C <chutten@mozilla.com>
Wed, 17 Apr 2019 22:21:01 +0000
changeset 470080 cec2387cbef5532ab7c52fc1d49bd6276bd4eeaf
parent 470079 4b317b418c1410ce46cacd6f52bbdf2b049f3387
child 470081 84110efda7165c81b707b3a2b8880b8aa44df7c1
push id35888
push useraiakab@mozilla.com
push dateFri, 19 Apr 2019 09:47:45 +0000
treeherdermozilla-central@0160424142d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjanerik
bugs1544911
milestone68.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 1544911 - Enable the 'prio' ping on Beta r=janerik Differential Revision: https://phabricator.services.mozilla.com/D27799
browser/app/profile/firefox.js
modules/libpref/init/all.js
toolkit/components/telemetry/docs/data/prio-ping.rst
toolkit/components/telemetry/docs/internals/preferences.rst
toolkit/components/telemetry/pings/PrioPing.jsm
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1856,20 +1856,16 @@ pref("fission.frontend.simulate-messages
 
 // Curve25519 public keys for Prio servers
 pref("prio.publicKeyA", "35AC1C7576C7C6EDD7FED6BCFC337B34D48CB4EE45C86BEEFB40BD8875707733");
 pref("prio.publicKeyB", "26E6674E65425B823F1F1D5F96E3BB3EF9E406EC7FBA7DEF8B08A35DD135AF50");
 
 // Coverage ping is disabled by default.
 pref("toolkit.coverage.enabled", false);
 pref("toolkit.coverage.endpoint.base", "https://coverage.mozilla.org");
-// Whether Prio-encoded Telemetry will be sent in the prio ping.
-#if defined(NIGHTLY_BUILD)
-pref("toolkit.telemetry.prioping.enabled", true);
-#endif
 
 // Discovery prefs
 pref("browser.discovery.enabled", true);
 pref("browser.discovery.containers.enabled", true);
 pref("browser.discovery.sites", "addons.mozilla.org");
 
 pref("browser.engagement.recent_visited_origins.expiry", 86400); // 24 * 60 * 60 (24 hours in seconds)
 
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -6068,14 +6068,11 @@ pref("dom.events.testing.asyncClipboard"
 
 #ifdef NIGHTLY_BUILD
 // Disable moz* APIs in DataTransfer
 pref("dom.datatransfer.mozAtAPIs", false);
 #else
 pref("dom.datatransfer.mozAtAPIs", true);
 #endif
 
-// Whether or not the Prio Ping is supported on this platform.
-pref("toolkit.telemetry.prioping.enabled", false);
-
 // External.AddSearchProvider is deprecated and it will be removed in the next
 // cycles.
 pref("dom.sidebar.enabled", true);
--- a/toolkit/components/telemetry/docs/data/prio-ping.rst
+++ b/toolkit/components/telemetry/docs/data/prio-ping.rst
@@ -25,17 +25,18 @@ The :doc:`Telemetry Environment <../data
 
 Scheduling
 ----------
 
 The ping is submitted at least once a day for sessions that last longer than 24h.
 The ping is immediately sent if the ``prioData`` array has 10 elements.
 The ping is submitted on shutdown.
 
-Whether the ping is enabled and the 10-element limit are controlled by :doc:`preferences <../internals/preferences>`.
+The ping is enabled on pre-release channels (Nightly, Beta), except when disabled by :doc:`preference <../internals/preferences>`.
+The 10-element limit is also controlled by :doc:`preference <../internals/preferences>`.
 
 Field details
 -------------
 
 reason
 ~~~~~~
 The ``reason`` field contains the information about why the "prio" ping was submitted:
 
--- a/toolkit/components/telemetry/docs/internals/preferences.rst
+++ b/toolkit/components/telemetry/docs/internals/preferences.rst
@@ -177,17 +177,17 @@ Preferences
 
   How long, in milliseconds, we batch accumulations from child processes before
   sending them to the parent process.
   Default is 2000 (milliseconds).
 
 ``toolkit.telemetry.prioping.enabled``
 
   Whether the :doc:`../data/prio-ping` is enabled.
-  Defaults to false except on Firefox Nightly where it is true. Change requires restart.
+  Defaults to true. Change requires restart.
 
 ``toolkit.telemetry.prioping.dataLimit``
 
   The number of encoded prio payloads which triggers an immediate :doc:`../data/prio-ping` with reason "max".
   Default is 10 payloads.
 
 Data-choices notification
 -------------------------
--- a/toolkit/components/telemetry/pings/PrioPing.jsm
+++ b/toolkit/components/telemetry/pings/PrioPing.jsm
@@ -51,18 +51,23 @@ var TelemetryPrioPing = {
 
   PRIO_PING_TYPE: "prio",
 
   _logger: null,
   _testing: false,
   _timeoutId: null,
 
   startup() {
-    if (!this._testing && !Services.prefs.getBoolPref(Utils.Preferences.PrioPingEnabled, false)) {
-      this._log.trace("Prio ping disabled.");
+    if (!this._testing && !Telemetry.canRecordPrereleaseData) {
+      this._log.trace("Extended collection disabled. Prio ping disabled.");
+      return;
+    }
+
+    if (!this._testing && !Services.prefs.getBoolPref(Utils.Preferences.PrioPingEnabled, true)) {
+      this._log.trace("Prio ping disabled by pref.");
       return;
     }
     this._log.trace("Starting up.");
 
     Services.obs.addObserver(this, PRIO_LIMIT_REACHED_TOPIC);
   },
 
   async shutdown() {