Closed Bug 1820211 Opened 1 year ago Closed 1 year ago

Add telemetry for detected tab kills with form data

Categories

(Fenix :: Browser Engine, task, P1)

All
Android

Tracking

(firefox113 verified)

VERIFIED FIXED
113 Branch
Tracking Status
firefox113 --- verified

People

(Reporter: calu, Assigned: boek)

References

(Blocks 1 open bug)

Details

(Whiteboard: [geckoview:m113])

Attachments

(1 file)

Add telemetry to Fenix to know if a tab has unsubmitted form data when it is killed. This will let us know what percentage of user-affected kills fall in this situation.

Store the result of whether or not we have form data as part of the tab state, and report that when tab kills are recorded (https://github.com/mozilla-mobile/firefox-android/blob/main/fenix/app/src/main/java/org/mozilla/fenix/telemetry/TelemetryMiddleware.kt#L122-L128).

Blocks: 1752594
Severity: -- → N/A
Depends on: 1777506, 1800146
Component: Experimentation and Telemetry → Browser Engine

If the percentage is high, we should add this feature to private sessions as well.

Assignee: nobody → jboek
Priority: -- → P1
Whiteboard: [geckoview:m113]
Authored by https://github.com/boek
https://github.com/mozilla-mobile/firefox-android/commit/7da21ab3f90f01432ea7c1b50806f68510567b39
[main] Bug 1820211 - Adds `tabKilled` event to track when a tab was killed with form data. (#1343)
Status: NEW → RESOLVED
Closed: 1 year ago
Flags: qe-verify+
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

Hello, :boek,
I attempted to verify this ticket by closing tabs and closing the app (with both the app in background and foreground) while having unsubmitted forms , however I was not able to capture the telemetry metrics engine_tab.kill_background_age, engine_tab.kill_foreground_age or engine_tab.kills as they appear in the Glean Dictionary.
I was wondering if there's another way to verify this or if testing from the QA team is needed at all. Please let us know your input on this.

Flags: needinfo?(jboek)

Hello! So the only time this happens is if the tab is killed. The way that I tested it was by running adb shell dumpsys meminfo to find the PID of the running tab and then following it up with adb shell kill <PID>.

Flags: needinfo?(jboek)

Thank you, Jeff!
We were not able to trigger the tab "kill" when using the command adb shell kill <PID> - we received the "Operation not permitted" message in Command prompt. We tried also on a debug build, still unsuccessfully.

Is there a different scenario we can try?
Thank you!

Flags: needinfo?(jboek)

We were able to generate the following events/metrics on the Fenix Nightly 114.0a1 from 4/12:

  • engine_tab.kill_background_age
  • engine_tab.kill_foreground_age
  • engine_tab.kills
  • engine_tab.tab_killed

Glean dashbord - metrics
Glean dashboard - event

Flags: needinfo?(jboek)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: