commit 03b625821523497a28e4ee2805adbde1ef204718
parent 5d92a14bf69a5639ce05cab3805c1d51791198c2
Author: Tanvi Manku <tanvi.manku@gmail.com>
Date: Thu, 27 Nov 2025 14:07:08 +0000
Bug 1999882 - Extend expiry of doorhangerSubmitted metrics to 155 and remove doorhanger_submitted mirror probe in Legacy Telemetry. r=dimi,toolkit-telemetry-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D273099
Diffstat:
3 files changed, 32 insertions(+), 52 deletions(-)
diff --git a/toolkit/components/passwordmgr/metrics.yaml b/toolkit/components/passwordmgr/metrics.yaml
@@ -118,6 +118,7 @@ pwmgr:
- https://bugzil.la/1754637
- https://bugzil.la/1850872
- https://bugzil.la/1969169
+ - https://bugzil.la/1999882
data_reviews: &pwmgr_doorhanger_submitted_data_reviews
- https://bugzil.la/1650929
- https://bugzil.la/1650941
@@ -127,7 +128,7 @@ pwmgr:
- https://bugzil.la/1850872
notification_emails: &pwmgr_doorhanger_submitted_emails
- passwords-dev@mozilla.org
- expires: 148
+ expires: 155
extra_keys: &pwmgr_doorhanger_submitted_extra
did_edit_un:
description: >
@@ -149,7 +150,6 @@ pwmgr:
Whether or not the saved/updated password was selected by the user choosing a suggested value from the autocomplete popup.
type: boolean
- telemetry_mirror: Pwmgr_DoorhangerSubmitted_Save
doorhanger_submitted_update:
type: event
@@ -168,9 +168,8 @@ pwmgr:
bugs: *pwmgr_doorhanger_submitted_bugs
data_reviews: *pwmgr_doorhanger_submitted_data_reviews
notification_emails: *pwmgr_doorhanger_submitted_emails
- expires: 148
+ expires: 155
extra_keys: *pwmgr_doorhanger_submitted_extra
- telemetry_mirror: Pwmgr_DoorhangerSubmitted_Update
saved_login_used_form_login:
type: event
diff --git a/toolkit/components/passwordmgr/test/browser/browser_doorhanger_submit_telemetry.js b/toolkit/components/passwordmgr/test/browser/browser_doorhanger_submit_telemetry.js
@@ -275,6 +275,8 @@ function _validateTestCase(tc) {
}
async function test_submit_telemetry(tc) {
+ Services.fog.testResetFOG();
+ await Services.fog.testFlushAllChildren();
if (tc.savedLogin) {
await Services.logins.addLoginAsync(
LoginTestUtils.testData.formLogin({
@@ -368,25 +370,34 @@ async function test_submit_telemetry(tc) {
);
}
- let expectedEvents = tc.expectedEvents.map(expectedEvent => [
- "pwmgr",
- "doorhanger_submitted",
- expectedEvent.type,
- null,
- expectedEvent.ping,
- ]);
+ await Services.fog.testFlushAllChildren();
- await LoginTestUtils.telemetry.waitForEventCount(
- expectedEvents.length,
- "parent",
- "pwmgr",
- "doorhanger_submitted"
- );
- TelemetryTestUtils.assertEvents(
- expectedEvents,
- { category: "pwmgr", method: "doorhanger_submitted" },
- { clear: true }
- );
+ let expectedEvents = tc.expectedEvents.map(e => ({
+ metric: e.type,
+ extra: e.ping,
+ }));
+
+ for (let expected of expectedEvents) {
+ let metricName = expected.metric;
+ let metric =
+ metricName === "save"
+ ? Glean.pwmgr.doorhangerSubmittedSave
+ : Glean.pwmgr.doorhangerSubmittedUpdate;
+
+ let events = await metric.testGetValue();
+
+ Assert.equal(
+ events.length,
+ 1,
+ `Number of ${metricName} events must match expected.`
+ );
+
+ Assert.deepEqual(
+ events[0].extra,
+ expected.extra,
+ `Extra for ${metricName} must match expected.`
+ );
+ }
// Clean up the database before the next test case is executed.
await cleanupDoorhanger(notif);
diff --git a/toolkit/components/telemetry/Events.yaml b/toolkit/components/telemetry/Events.yaml
@@ -1207,36 +1207,6 @@ pwmgr:
products:
- "firefox"
record_in_processes: [content, main]
- doorhanger_submitted:
- description: >
- A login is saved or updated via the capture doorhanger. Carries information about whether
- the username and password _that were saved/updated by the user_ were modified in the
- doorhanger, selected from the suggestion autocomplete, or neither. `did_edit_X` and
- `did_select_X` will never both be true in the same event.
-
- The `object` describes the type of doorhanger when it was originally created. Note that user
- updates to the doorhanger may change whether a login is actually saved or updated, but will
- not impact the sent object.
- objects: ["save", "update"]
- bug_numbers: [1650929, 1650941, 1678200, 1714252, 1754637, 1850872, 1969169]
- expiry_version: "148"
- release_channel_collection: opt-out
- products: ["firefox"]
- record_in_processes: [main]
- notification_emails: ["passwords-dev@mozilla.org"]
- extra_keys:
- did_edit_un: >
- Whether or not the saved/updated username was modified by the user typing into the
- username field.
- did_select_un: >
- Whether or not the saved/updated username was selected by the user choosing a suggested
- value from the autocomplete popup.
- did_edit_pw: >
- Whether or not the saved/updated password was modified by the user typing into the
- password field.
- did_select_pw: >
- Whether or not the saved/updated password was selected by the user choosing a suggested
- value from the autocomplete popup.
# Record telemetry based on individual Firefox relay UI (autocomplete popup, notification panel)
relay_integration: