For #10069 - review: change extra name to firstFramePreDrawNanos.

pull/216/head
Michael Comella 4 years ago committed by Michael Comella
parent 8f16f9cb37
commit a1bbd2589e

@ -52,9 +52,9 @@ events:
for example, when we are doing a hot start up, we cant have a
savedInstanceState therefore we report only [APP_ICON, HOT] instead
of [APP_ICON, HOT, false].
launch_time_nano_seconds:
first_frame_pre_draw_nanos:
description: |
the number of nano seconds application took to launch. This is the
the number of nanoseconds the application took to launch. This is the
time difference between application launch(user pressing app_icon,
launching a link) and until the first view is about to be drawn
on the screen. If the time is not captured, this extra key will

@ -356,7 +356,7 @@ sealed class Event {
hasSavedInstanceState.toString()
}
if (launchTime != null) {
extrasMap[Events.appOpenedAllStartupKeys.launchTimeNanoSeconds] =
extrasMap[Events.appOpenedAllStartupKeys.firstFramePreDrawNanos] =
launchTime.toString()
}
return extrasMap

@ -19,10 +19,10 @@ import org.junit.Before
import org.junit.Test
import org.junit.Assert.assertTrue
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.GleanMetrics.Events.appOpenedAllStartupKeys.firstFramePreDrawNanos
import org.mozilla.fenix.GleanMetrics.Events.appOpenedAllStartupKeys.hasSavedInstanceState
import org.mozilla.fenix.GleanMetrics.Events.appOpenedAllStartupKeys.source
import org.mozilla.fenix.GleanMetrics.Events.appOpenedAllStartupKeys.type
import org.mozilla.fenix.GleanMetrics.Events.appOpenedAllStartupKeys.launchTimeNanoSeconds
import org.mozilla.fenix.components.metrics.Event.AppAllStartup
import org.mozilla.fenix.components.metrics.Event.AppAllStartup.Source
import org.mozilla.fenix.components.metrics.Event.AppAllStartup.Source.APP_ICON
@ -272,7 +272,7 @@ class AppStartupTelemetryTest {
val expectedExtra: Map<Events.appOpenedAllStartupKeys, String>? = hashMapOf(
source to APP_ICON.toString(),
type to HOT.toString(),
launchTimeNanoSeconds to onPreDrawTime.minus(homeActivityInitTime).toString())
firstFramePreDrawNanos to onPreDrawTime.minus(homeActivityInitTime).toString())
val appAllStartup = AppAllStartup(APP_ICON, HOT, launchTime = onPreDrawTime.minus(homeActivityInitTime))
@ -285,7 +285,7 @@ class AppStartupTelemetryTest {
source to APP_ICON.toString(),
type to COLD.toString(),
hasSavedInstanceState to true.toString(),
launchTimeNanoSeconds to onPreDrawTime.minus(homeActivityInitTime).toString())
firstFramePreDrawNanos to onPreDrawTime.minus(homeActivityInitTime).toString())
val appAllStartup = AppAllStartup(APP_ICON, COLD, true, onPreDrawTime.minus(homeActivityInitTime))

@ -99,7 +99,7 @@ The following metrics are added to the ping:
| download_notification.try_again |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped on try again when a download fails in the download notification |[1](https://github.com/mozilla-mobile/fenix/pull/6554), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)||2021-04-01 |2 |
| error_page.visited_error |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user encountered an error page |[1](https://github.com/mozilla-mobile/fenix/pull/2491#issuecomment-492414486), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>error_type: The error type of the error page encountered</li></ul>|2021-04-01 |2 |
| events.app_opened |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the app (from cold start, to the homescreen or browser) |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>source: The method used to open Fenix. Possible values are: `app_icon`, `custom_tab` or `link` </li></ul>|2021-04-01 |2 |
| events.app_opened_all_startup |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the app to the HomeActivity. The HomeActivity encompasses the home screen, browser screen, settings screen, collections and other screens in the nav_graph. This differs from the app_opened probe because it measures all startups, not just cold startup. Note: There is a short gap between the time application goes into background and the time android reports the application going into the background. Note: This metric does not record souce when app opened from task switcher: open application -> press home button -> open recent tasks -> choose fenix. In this case will report [source = unknown, type = hot, has_saved_instance_state = false]. |[1](https://github.com/mozilla-mobile/fenix/pull/12114#pullrequestreview-445245341), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [3](https://github.com/mozilla-mobile/fenix/pull/13494#pullrequestreview-474050499)|<ul><li>has_saved_instance_state: boolean value whether or not startup type has a savedInstance. using savedInstance, HomeActivity's previous state can be restored. This is an optional key since it is not applicable to all the cases. for example, when we are doing a hot start up, we cant have a savedInstanceState therefore we report only [APP_ICON, HOT] instead of [APP_ICON, HOT, false]. </li><li>launch_time_nano_seconds: the number of nano seconds application took to launch. This is the time difference between application launch(user pressing app_icon, launching a link) and until the first view is about to be drawn on the screen. If the time is not captured, this extra key will not be reported. </li><li>source: The method used to open Fenix. Possible values are `app_icon`, `custom_tab`, `link` or `unknown`. unknown is for startup sources where we can't pinpoint the cause. One UNKNOWN case is the app switcher where we don't know what variables to check to ensure this startup wasn't caused by something else. </li><li>type: the startup type for opening fenix. the application and HomeActivity either needs to be created or started again. possible values are `cold`, `warm`, `hot` or `error`. Error is for impossible cases. Please file a bug if you see the error case. app created AND HomeActivity created = cold app started AND HomeActivity created = warm app started AND HomeActivity started = hot app created AND HomeActivity started = error Some applications such as gmail launches the default browser in the background. So when we eventually click a link, browser is already started in the background. This means that custom_tab will mostly report `warm` startup type. </li></ul>|2021-06-01 |2 |
| events.app_opened_all_startup |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the app to the HomeActivity. The HomeActivity encompasses the home screen, browser screen, settings screen, collections and other screens in the nav_graph. This differs from the app_opened probe because it measures all startups, not just cold startup. Note: There is a short gap between the time application goes into background and the time android reports the application going into the background. Note: This metric does not record souce when app opened from task switcher: open application -> press home button -> open recent tasks -> choose fenix. In this case will report [source = unknown, type = hot, has_saved_instance_state = false]. |[1](https://github.com/mozilla-mobile/fenix/pull/12114#pullrequestreview-445245341), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877), [3](https://github.com/mozilla-mobile/fenix/pull/13494#pullrequestreview-474050499)|<ul><li>first_frame_pre_draw_nanos: the number of nanoseconds the application took to launch. This is the time difference between application launch(user pressing app_icon, launching a link) and until the first view is about to be drawn on the screen. If the time is not captured, this extra key will not be reported. </li><li>has_saved_instance_state: boolean value whether or not startup type has a savedInstance. using savedInstance, HomeActivity's previous state can be restored. This is an optional key since it is not applicable to all the cases. for example, when we are doing a hot start up, we cant have a savedInstanceState therefore we report only [APP_ICON, HOT] instead of [APP_ICON, HOT, false]. </li><li>source: The method used to open Fenix. Possible values are `app_icon`, `custom_tab`, `link` or `unknown`. unknown is for startup sources where we can't pinpoint the cause. One UNKNOWN case is the app switcher where we don't know what variables to check to ensure this startup wasn't caused by something else. </li><li>type: the startup type for opening fenix. the application and HomeActivity either needs to be created or started again. possible values are `cold`, `warm`, `hot` or `error`. Error is for impossible cases. Please file a bug if you see the error case. app created AND HomeActivity created = cold app started AND HomeActivity created = warm app started AND HomeActivity started = hot app created AND HomeActivity started = error Some applications such as gmail launches the default browser in the background. So when we eventually click a link, browser is already started in the background. This means that custom_tab will mostly report `warm` startup type. </li></ul>|2021-06-01 |2 |
| events.app_received_intent |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The system received an Intent for the HomeActivity. An intent is received an external entity wants to the app to display content. Intents can be received when the app is closed at which point the app will be opened or when the app is already opened at which point the already open app will make changes such as loading a url. This can be used loosely as a heuristic for when the user requested to open the app. The HomeActivity encompasses the home screen and browser screen but may include other screens. This differs from the app_opened probe because it measures all startups, not just cold startup. |[1](https://github.com/mozilla-mobile/fenix/pull/11940/), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>source: The method used to open Fenix. Possible values are `app_icon`, `custom_tab`, `link` or `unknown` </li></ul>|2021-06-01 | |
| events.browser_menu_action |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A browser menu item was tapped |[1](https://github.com/mozilla-mobile/fenix/pull/1214#issue-264756708), [2](https://github.com/mozilla-mobile/fenix/pull/5098#issuecomment-529658996), [3](https://github.com/mozilla-mobile/fenix/pull/6310), [4](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>item: A string containing the name of the item the user tapped. These items include: Settings, Help, Desktop Site toggle on/off, Find in Page, New Tab, Private Tab, Share, Report Site Issue, Back/Forward button, Reload Button, Quit, Reader Mode On, Reader Mode Off, Open In app, Add To Top Sites, Add-ons Manager, Bookmarks, History </li></ul>|2021-04-01 |2 |
| events.entered_url |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user entered a url |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673), [2](https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877)|<ul><li>autocomplete: A boolean that tells us whether the URL was autofilled by an Autocomplete suggestion </li></ul>|2021-04-01 |2 |

Loading…
Cancel
Save