tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 66b92d074cc35c9b5b2a1e311908faf46c74b1e1
parent b50f4176db6d0055e3edf1fe5f6234ac790a6d44
Author: Tom Ritter <tom@mozilla.com>
Date:   Mon, 29 Dec 2025 20:28:57 +0000

Bug 2005865: Add metrics reporting Linux Distro information r=timhuang

Differential Revision: https://phabricator.services.mozilla.com/D276931

Diffstat:
Mtoolkit/components/resistfingerprinting/UserCharacteristicsPageService.sys.mjs | 13+++++++++++++
Mtoolkit/components/resistfingerprinting/metrics.yaml | 54++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtoolkit/components/resistfingerprinting/nsUserCharacteristics.cpp | 2+-
3 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/toolkit/components/resistfingerprinting/UserCharacteristicsPageService.sys.mjs b/toolkit/components/resistfingerprinting/UserCharacteristicsPageService.sys.mjs @@ -740,6 +740,19 @@ export class UserCharacteristicsPageService { Glean.characteristics.osVersion.set( Services.sysinfo.getProperty("version") ); + if (Services.sysinfo.hasKey("distro")) { + Glean.characteristics.osDistro.set( + Services.sysinfo.getProperty("distro") + ); + } + if (Services.sysinfo.hasKey("distroVersion")) { + Glean.characteristics.osDistroVersion.set( + Services.sysinfo.getProperty("distroVersion") + ); + } + if (Services.appinfo.distributionID) { + Glean.characteristics.osDistroId.set(Services.appinfo.distributionID); + } Glean.characteristics.buildDate.set(buildDate); } diff --git a/toolkit/components/resistfingerprinting/metrics.yaml b/toolkit/components/resistfingerprinting/metrics.yaml @@ -3842,6 +3842,60 @@ characteristics: data_sensitivity: - technical + os_distro: + type: string + description: > + User's OS distribution, as reported by lsb_release (Linux only, blank otherwise) + lifetime: application + send_in_pings: + - user-characteristics + notification_emails: + - tom@mozilla.com + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1879151 + - https://bugzilla.mozilla.org/show_bug.cgi?id=2005865 + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=2005865 + expires: never + data_sensitivity: + - technical + + os_distro_id: + type: string + description: > + User's OS distribution, as reported by MOZ_DISTRIBUTION_ID + lifetime: application + send_in_pings: + - user-characteristics + notification_emails: + - tom@mozilla.com + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1879151 + - https://bugzilla.mozilla.org/show_bug.cgi?id=2005865 + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=2005865 + expires: never + data_sensitivity: + - technical + + os_distro_version: + type: string + description: > + User's OS distribution version, as reported by lsb_release (Linux only, blank otherwise) + lifetime: application + send_in_pings: + - user-characteristics + notification_emails: + - tom@mozilla.com + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1879151 + - https://bugzilla.mozilla.org/show_bug.cgi?id=2005865 + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=2005865 + expires: never + data_sensitivity: + - technical + cpu_model: type: string description: > diff --git a/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp b/toolkit/components/resistfingerprinting/nsUserCharacteristics.cpp @@ -801,7 +801,7 @@ const RefPtr<PopulatePromise>& TimoutPromise( // metric is set, this variable should be incremented. It'll be a lot. It's // okay. We're going to need it to know (including during development) what is // the source of the data we are looking at. -const int kSubmissionSchema = 27; +const int kSubmissionSchema = 28; const auto* const kUUIDPref = "toolkit.telemetry.user_characteristics_ping.uuid";