Bug 1499552 - Add dummy pref and report via telemetry to verify telemetry pref reporting. r=mythmon data-review=francois
authorChris Pearce <cpearce@mozilla.com>
Wed, 17 Oct 2018 23:48:12 +0000
changeset 490200 1c74b82884a8ba8b04029c0b347cbe6ff1ed8ad2
parent 490199 db122d6af0fa9a7db04d13c7a888f3b38f1eb1f9
child 490201 adb07f2a1331142569039567d81f5168ada17198
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersmythmon
bugs1499552
milestone64.0a1
Bug 1499552 - Add dummy pref and report via telemetry to verify telemetry pref reporting. r=mythmon data-review=francois The Webrender Pref Experiment is reporting its pref via telemetry and that is reporting a different value than what the Normandy experiments telemetry indicates should be being seen. So add reporting for two dummy prefs, one with a default value, and one without. We intend to push out Normandy rules to report these prefs to double-check that Normandy is working as expected. Differential Revision: https://phabricator.services.mozilla.com/D8926
modules/libpref/init/all.js
toolkit/components/telemetry/app/TelemetryEnvironment.jsm
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -5929,8 +5929,14 @@ pref("dom.datatransfer.mozAtAPIs", false
 #else
 pref("dom.datatransfer.mozAtAPIs", true);
 #endif
 
 // Whether or not Prio is supported on this platform.
 #ifdef MOZ_LIBPRIO
 pref("prio.enabled", false);
 #endif
+
+#ifdef NIGHTLY_BUILD
+// Bug 1499552; add a dummy pref to verify that collection of preferences
+// via telemetry is working as expected.
+pref("app.normandy.test.with_default", false);
+#endif
--- a/toolkit/components/telemetry/app/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/app/TelemetryEnvironment.jsm
@@ -178,16 +178,18 @@ const RECORD_PREF_STATE = TelemetryEnvir
 const RECORD_PREF_VALUE = TelemetryEnvironment.RECORD_PREF_VALUE;
 const RECORD_DEFAULTPREF_VALUE = TelemetryEnvironment.RECORD_DEFAULTPREF_VALUE;
 const RECORD_DEFAULTPREF_STATE = TelemetryEnvironment.RECORD_DEFAULTPREF_STATE;
 const DEFAULT_ENVIRONMENT_PREFS = new Map([
   ["app.feedback.baseURL", {what: RECORD_PREF_VALUE}],
   ["app.support.baseURL", {what: RECORD_PREF_VALUE}],
   ["accessibility.browsewithcaret", {what: RECORD_PREF_VALUE}],
   ["accessibility.force_disabled", {what:  RECORD_PREF_VALUE}],
+  ["app.normandy.test.with_default", {what: RECORD_PREF_VALUE}],
+  ["app.normandy.test.without_default", {what: RECORD_PREF_VALUE}],
   ["app.shield.optoutstudies.enabled", {what: RECORD_PREF_VALUE}],
   ["app.update.auto", {what: RECORD_PREF_VALUE}],
   ["app.update.interval", {what: RECORD_PREF_VALUE}],
   ["app.update.service.enabled", {what: RECORD_PREF_VALUE}],
   ["app.update.silent", {what: RECORD_PREF_VALUE}],
   ["app.update.url", {what: RECORD_PREF_VALUE}],
   ["browser.cache.disk.enable", {what: RECORD_PREF_VALUE}],
   ["browser.cache.disk.capacity", {what: RECORD_PREF_VALUE}],