Bug 1889338 - Remove isEarlyStartup from DAP feature r=barret,firefox-desktop-core-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D206472
This commit is contained in:
Simon Friedberger 2024-04-16 12:22:37 +00:00
parent bb878db393
commit c3c69eabee
4 changed files with 9 additions and 13 deletions

View File

@ -3088,11 +3088,9 @@ BrowserGlue.prototype = {
{
name: "DAPTelemetrySender.startup",
condition:
lazy.TelemetryUtils.isTelemetryEnabled &&
lazy.NimbusFeatures.dapTelemetry.getVariable("enabled"),
task: () => {
lazy.DAPTelemetrySender.startup();
condition: lazy.TelemetryUtils.isTelemetryEnabled,
task: async () => {
await lazy.DAPTelemetrySender.startup();
},
},

View File

@ -1694,26 +1694,20 @@ dapTelemetry:
description: DAP Telemetry
owner: simon@mozilla.com
hasExposure: false
isEarlyStartup: true # Data is sent on startup with a trigger in BrowserGlue.sys.mjs
variables:
enabled:
type: boolean
fallbackPref: toolkit.telemetry.dap_enabled
description: Whether to automatically send DAP measurements.
task1Enabled:
type: boolean
fallbackPref: toolkit.telemetry.dap_task1_enabled
description: Whether to send fake measurements for task 1.
task1TaskId:
type: string
fallbackPref: toolkit.telemetry.dap_task1_taskid
description: The task ID to use for task 1 measurements.
visitCountingEnabled:
type: boolean
fallbackPref: toolkit.telemetry.dap_visit_counting_enabled
description: Whether to count visits to the provided list of URLs.
visitCountingExperimentList:
fallbackPref: toolkit.telemetry.dap_visit_counting_experiment_list
type: json
description: A list of experiments with URLs for which we want to count visits.

View File

@ -26,7 +26,6 @@ NIMBUS_FALLBACK_PREFS = (
ALLOWED_ISEARLYSTARTUP_FEATURE_IDS = {
"abouthomecache",
"aboutwelcome",
"dapTelemetry",
"gleanInternalSdk",
"majorRelease2022",
"newtab",

View File

@ -35,7 +35,12 @@ XPCOMUtils.defineLazyPreferenceGetter(lazy, "HELPER", PREF_HELPER, undefined);
*/
export const DAPTelemetrySender = new (class {
startup() {
async startup() {
await lazy.NimbusFeatures.dapTelemetry.ready();
if (!lazy.NimbusFeatures.dapTelemetry.getVariable("enabled")) {
return;
}
lazy.logConsole.debug("Performing DAP startup");
if (lazy.NimbusFeatures.dapTelemetry.getVariable("visitCountingEnabled")) {