Closed Bug 2092154 Opened 13 days ago Closed 1 day ago

Add telemetry to check tab group references in session file at startup

Categories

(Firefox :: Session Restore, task)

task
Points:
3

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: mhynson, Assigned: mhynson)

References

Details

(Whiteboard: [fidefe-session-restore])

Attachments

(1 external file)

We don't yet have data on how often session files have broken tab group references. Bug 2089797 and bug 2089794 describe ways saved groups can be lost or left with stale flags. Before addressing ways saved groups can be lost or left with stale flags (2089797, 2089794) we want a baseline so we can tell whether the fixes change anything.

At startup, update SessionStore tocheck the state and increase a counter for each problem found:

  • Open windows (windows[]): a group in groups that no tab points to, and a tab whose groupId has no matching entry in groups.
  • Closed windows (_closedWindows[]): the same two checks - a group in groups that no tab points to, and a tab whose groupId has no matching entry in groups..
  • Closed groups (windows[].closedGroups): a group with no tabs.
  • Saved groups (savedGroups): a group with no tabs, and an entry that isn't a group object (see 2087600).
  • Stale restore flags: a saved group flagged removeAfterRestore that has no matching open group in lastSessionState.windows. This is the situation that makes restoreLastSession delete a saved group by mistake (2089797,).
Points: 2 → 3
Assignee: nobody → mhynson
Whiteboard: [fidefe-session-restore]
Attachment #9682606 - Attachment description: WIP: Bug 2092154 - Add telemetry for broken tab group references in the Session Store. r?#sessionstore-reviewers → Bug 2092154 - Add telemetry for broken tab group references in the Session Store. r?#sessionstore-reviewers

I wanted to note here that I've set the expires version in the metrics.yaml to version 190 and I'm using a version number and not a date based on this slack thread. The version number I've chosen represents a version around a year away but is fairly arbitrary and simply represents that the metrics should probably be retired at some point.

With that said, here is a follow-up bug to revisit the metrics.

Pushed by mhynson@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/aa5a3e5ba7b5 https://hg.mozilla.org/integration/autoland/rev/8a0e88d163d3 Add telemetry for broken tab group references in the Session Store. r=sessionstore-reviewers,jswinarton
Status: NEW → RESOLVED
Closed: 1 day ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: