android-components icon indicating copy to clipboard operation
android-components copied to clipboard

[Meta] Add telemetry for page persistence

Open agi opened this issue 5 years ago • 3 comments

Spinning off from https://github.com/mozilla-mobile/android-components/issues/9366#issuecomment-772628773

I think something that would be interesting to track is:

  • number of times the user switches to a tab and
    • the tab is not loaded
    • the tab is loaded
  • number of times the user taps on the app and
    • fenix cold starts
    • fenix warm starts but tab is not loaded
    • fenix warm starts and tab is loaded
  • number of times we receive onTrimMemory and
    • we ignore it
    • we unload tabs (and how many)
    • what level
  • number of times we get killed in the background using
    • onKill (for content process) and
    • getHistoricalProcessExitReasons for main process https://developer.android.com/reference/kotlin/android/app/ActivityManager#gethistoricalprocessexitreasons (API30 only I think)
  • number of alive tabs when
    • going to background
    • going back to foreground and how long we've been backgrounded (so we can plot tab retention with 1,5,10,30 minutes)

This metrics could help us track how memory/performance affects retaining tabs/getting killed and how often our users get their tabs reloaded. Also it can help us know how many tabs are actually alive in users devices (e.g. when thinking about memory/performance tradeoffs based on number of tabs)

┆Issue is synchronized with this Jira Task

agi avatar Feb 04 '21 22:02 agi

We are thinking the priority of these probes are as follows:

  1. number of times the user taps on the app and fenix warm starts but tab is not loaded
  2. number of alive tabs when * going to background * going back to foreground and how long we've been backgrounded (so we can plot tab retention with 1,5,10,30 minutes)
  3. number of times we receive onTrimMemory and we unload tabs (and how many)
  4. .... the others

fluffyemily avatar Mar 30 '21 15:03 fluffyemily

After discussion with @pocmo it was determined that it is not possible to collect the information regarding cold and warm starts

fluffyemily avatar Mar 30 '21 15:03 fluffyemily

Moved to bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1796483

Change performed by the Move to Bugzilla add-on.

cpeterso avatar Oct 20 '22 05:10 cpeterso