From e4bc7fd700c1ba63fa00a26a02492c07c5e0854f Mon Sep 17 00:00:00 2001 From: Alex Hochheiden Date: Tue, 22 Apr 2025 04:43:12 +0000 Subject: [PATCH] Bug 1953991 - Add a comment detailing why Glean must be initialized even if telemetry is disabled r=firefox-build-system-reviewers,glandium Differential Revision: https://phabricator.services.mozilla.com/D245363 --- python/mach/mach/telemetry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/mach/mach/telemetry.py b/python/mach/mach/telemetry.py index ddfd80c41351..fd5d222f3c6d 100644 --- a/python/mach/mach/telemetry.py +++ b/python/mach/mach/telemetry.py @@ -57,6 +57,9 @@ def create_telemetry_from_environment(settings): from pathlib import Path + # We must initialize Glean even if telemetry is disabled to ensure a deletion ping is sent. + # This deletes any previously collected data if the user opts out of telemetry. + # Creating GleanTelemetry will load and register pings, # which must be done before init or no metrics can be recorded for them. telemetry_interface = GleanTelemetry()