From f9f8606372e64b04c417256452f24ea335fd5808 Mon Sep 17 00:00:00 2001 From: Daosheng Mu Date: Fri, 12 Jun 2020 10:02:14 -0700 Subject: [PATCH] Multiple window and immersive mode time measurement telemetry. (#3430) * Bump to AC 41.0.0. * Adding loading time and immersive mode duration Glean telemetry. * Adding multiple window Glean telemetry. * Adding time measurement metrics to metrics.yaml. * Adding multiple window telemetry tests for Glean. --- app/metrics.yaml | 279 +++++++++++++++++- app/pings.yaml | 6 +- .../org/mozilla/vrbrowser/browser/Places.kt | 8 +- .../vrbrowser/browser/engine/Session.java | 2 +- .../telemetry/GleanMetricsService.java | 222 ++++++++++++-- .../ui/widgets/NavigationBarWidget.java | 2 + .../vrbrowser/ui/widgets/WindowWidget.java | 6 +- .../mozilla/vrbrowser/ui/widgets/Windows.java | 8 + .../vrbrowser/GleanMetricsServiceTest.kt | 116 +++++++- docs/metrics.md | 35 ++- versions.gradle | 2 +- 11 files changed, 623 insertions(+), 63 deletions(-) diff --git a/app/metrics.yaml b/app/metrics.yaml index f73b007c5..0d16444a2 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -2,7 +2,7 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. - +--- $schema: moz://mozilla.org/schemas/glean/metrics/1-0-0 distribution: @@ -10,10 +10,11 @@ distribution: type: string lifetime: application description: > - The distribution channel name of this application. We use this field to recognize Firefox Reality - is distributed to which channels, such as wavevr, oculusvr, etc. + The distribution channel name of this application. + We use this field to recognize Firefox + Reality is distributed to which channels, + such as wavevrStore, oculusvr, picovr,etc. send_in_pings: - - baseline - events - metrics - session-end @@ -154,7 +155,8 @@ firefox_account: The user finishes the sign in flow extra_keys: state: - description: "The result of the sign in flow. True in case of success, false in case of error" + description: "The result of the sign in flow. + True in case of success, false in case of error" bugs: - https://github.com/MozillaReality/FirefoxReality/issues/1610 data_reviews: @@ -167,7 +169,8 @@ firefox_account: sign_out: type: event description: > - A user pressed the sign out button on the sync account page and was successfully signed out of FxA + A user pressed the sign out button on the sync account page + and was successfully signed out of FxA bugs: - https://github.com/MozillaReality/FirefoxReality/issues/1610 data_reviews: @@ -181,7 +184,8 @@ firefox_account: type: boolean lifetime: application description: > - Bookmarks sync engine status. True means that the bookmarks sync status is enabled, false otherwise. + Bookmarks sync engine status. + True means that the bookmarks sync status is enabled, false otherwise. bugs: - https://github.com/MozillaReality/FirefoxReality/issues/1610 data_reviews: @@ -195,7 +199,8 @@ firefox_account: type: boolean lifetime: application description: > - History sync engine status. True means that the history sync status is enabled, false otherwise. + History sync engine status. + True means that the history sync status is enabled, false otherwise. bugs: - https://github.com/MozillaReality/FirefoxReality/issues/1610 data_reviews: @@ -261,7 +266,8 @@ legacy_telemetry: type: uuid description: > A UUID uniquely identifying the legacy telemetry client id. - This is used for supporting legacy telemetry in the `deletion-request` ping. + This is used for supporting legacy telemetry in the `deletion-request` + ping. send_in_pings: - deletion-request bugs: @@ -272,3 +278,258 @@ legacy_telemetry: - fxr-telemetry@mozilla.com - dmu@mozilla.com expires: "2020-11-01" + +pages: + page_load: + type: timing_distribution + description: > + Measuring how long each page takes to load. + time_unit: nanosecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + +immersive: + duration: + type: timing_distribution + description: > + Measuring if users use WebXR APIs to enter XR immersive mode. + How long they stay in this mode. (It starts from users call + `navigator.xr.requestSession()` and be ended when the XRSession calls + its `end()`.) + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + +windows: + duration: + type: timing_distribution + description: > + Measuring how long windows are kept open. + time_unit: millisecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + movement: + type: counter + description: > + Counting how many times of moving a window in a session. + send_in_pings: + - session-end + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + resize: + type: counter + description: > + Counting how many times of resizing a window in a session. + send_in_pings: + - session-end + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + active_in_left_time: + type: timing_distribution + description: > + In Firefox Reality, we allow maximum three windows be placed at front, + left, and right positions simultaneously. Using this metric to measure + how long the left side window is active in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + active_in_right_time: + type: timing_distribution + description: > + In Firefox Reality, we allow maximum three windows be placed at front, + left, and right positions simultaneously. Using this metric to measure + how long the right side window is active in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + active_in_front_time: + type: timing_distribution + description: > + In Firefox Reality, we allow maximum three windows be placed at front, + left, and right positions simultaneously. Using this metric to measure + how long the front side window is active in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + single_window_opened_time: + type: timing_distribution + description: > + Measuring how long a user uses single window in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + double_window_opened_time: + type: timing_distribution + description: > + Measuring how long a user uses double windows in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + triple_window_opened_time: + type: timing_distribution + description: > + Measuring how long a user uses triple windows in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + single_pri_window_opened_time: + type: timing_distribution + description: > + Measuring how long a user uses single private window in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + double_pri_window_opened_time: + type: timing_distribution + description: > + Measuring how long a user uses double private windows in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + triple_pri_window_opened_time: + type: timing_distribution + description: > + Measuring how long a user uses triple private windows in a session. + send_in_pings: + - session-end + time_unit: microsecond + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2279 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + opened_window_count: + type: labeled_counter + description: > + Counting which multiple window mode (single, double, triple) + users are using in a session. + send_in_pings: + - session-end + labels: + - single + - double + - triple + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2230 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" + opened_pri_window_count: + type: labeled_counter + description: > + Counting which multiple private window mode (single, double, triple) + users are using in a session. + send_in_pings: + - session-end + labels: + - single + - double + - triple + bugs: + - https://github.com/MozillaReality/FirefoxReality/issues/2230 + data_reviews: + - https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166 + notification_emails: + - fxr-telemetry@mozilla.com + - dmu@mozilla.com + expires: "2020-11-01" diff --git a/app/pings.yaml b/app/pings.yaml index 528f675c1..da1768c5a 100644 --- a/app/pings.yaml +++ b/app/pings.yaml @@ -2,12 +2,14 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +--- $schema: moz://mozilla.org/schemas/glean/pings/1-0-0 session-end: description: > - This ping is sent at the end of a session (when Firefox Reality switches to the background). - We usually send search and UI control metrics at the end of a session. + This ping is sent at the end of a session (when Firefox Reality + switches to the background). We usually send search and UI control + metrics at the end of a session. include_client_id: true bugs: - https://github.com/MozillaReality/FirefoxReality/issues/2230 diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/Places.kt b/app/src/common/shared/org/mozilla/vrbrowser/browser/Places.kt index d622f3138..caca7511d 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/Places.kt +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/Places.kt @@ -26,9 +26,11 @@ class Places(var context: Context) { val files = context.filesDir.listFiles { _, name -> name.matches("places\\.sqlite.*".toRegex()) } - for (file in files) { - if (!file.delete()) { - Logger(LOGTAG).debug("Can't remove " + file.absolutePath) + if (files != null) { + for (file in files) { + if (!file.delete()) { + Logger(LOGTAG).debug("Can't remove " + file.absolutePath) + } } } diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java index d985b4692..ab9cfa299 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/engine/Session.java @@ -1143,7 +1143,7 @@ public void onPageStart(@NonNull GeckoSession aSession, @NonNull String aUri) { Log.d(LOGTAG, "Session onPageStart"); mState.mIsLoading = true; TelemetryWrapper.startPageLoadTime(); - GleanMetricsService.startPageLoadTime(); + GleanMetricsService.startPageLoadTime(aUri); setWebXRState(SessionState.WEBXR_UNUSED); for (GeckoSession.ProgressDelegate listener : mProgressListeners) { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/telemetry/GleanMetricsService.java b/app/src/common/shared/org/mozilla/vrbrowser/telemetry/GleanMetricsService.java index f1f4b1318..1a72cf8ac 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/telemetry/GleanMetricsService.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/telemetry/GleanMetricsService.java @@ -16,20 +16,27 @@ import org.mozilla.vrbrowser.GleanMetrics.Searches; import org.mozilla.vrbrowser.GleanMetrics.Url; import org.mozilla.vrbrowser.GleanMetrics.Control; +import org.mozilla.vrbrowser.GleanMetrics.Pages; +import org.mozilla.vrbrowser.GleanMetrics.Immersive; +import org.mozilla.vrbrowser.GleanMetrics.Windows; import org.mozilla.vrbrowser.browser.SettingsStore; import org.mozilla.vrbrowser.search.SearchEngineWrapper; import org.mozilla.vrbrowser.utils.DeviceType; import org.mozilla.vrbrowser.utils.SystemUtils; import org.mozilla.vrbrowser.utils.UrlUtils; +import static org.mozilla.vrbrowser.ui.widgets.Windows.WindowPlacement; +import static org.mozilla.vrbrowser.ui.widgets.Windows.MAX_WINDOWS; import java.net.URI; import java.util.HashMap; import java.util.HashSet; +import java.util.Hashtable; import java.util.Map; import java.util.UUID; import mozilla.components.service.glean.Glean; import mozilla.components.service.glean.config.Configuration; +import mozilla.telemetry.glean.GleanTimerId; public class GleanMetricsService { @@ -39,6 +46,12 @@ public class GleanMetricsService { private static boolean initialized = false; private static Context context = null; private static HashSet domainMap = new HashSet(); + private static Map loadingTimerId = new Hashtable<>(); + private static GleanTimerId immersiveTimerId; + private static Map windowLifeTimerId = new Hashtable<>(); + private static GleanTimerId activeWindowTimerId[] = new GleanTimerId[MAX_WINDOWS]; + private static GleanTimerId openWindowTimerId[] = new GleanTimerId[MAX_WINDOWS]; + private static GleanTimerId openPrivateWindowTimerId[] = new GleanTimerId[MAX_WINDOWS]; // We should call this at the application initial stage. public static void init(Context aContext) { @@ -73,14 +86,19 @@ public static void stop() { Glean.INSTANCE.setUploadEnabled(false); } - public static void startPageLoadTime() { - // TODO: Blocked by Bug 1595914. - // pageLoadingTimerId = Pages.INSTANCE.getPageLoad().start(); + public static void startPageLoadTime(String aUrl) { + GleanTimerId pageLoadingTimerId = Pages.INSTANCE.pageLoad().start(); + loadingTimerId.put(aUrl, pageLoadingTimerId); } public static void stopPageLoadTimeWithURI(String uri) { - // TODO: Blocked by Bug 1595914. - // Pages.INSTANCE.getPageLoad().stopAndAccumulate(pageLoadingTimerId); + if (loadingTimerId.containsKey(uri)) { + GleanTimerId pageLoadingTimerId = loadingTimerId.get(uri); + Pages.INSTANCE.pageLoad().stopAndAccumulate(pageLoadingTimerId); + loadingTimerId.remove(uri); + } else { + Log.e(LOGTAG, "Can't find page loading url."); + } try { URI uriLink = URI.create(uri); @@ -92,16 +110,179 @@ public static void stopPageLoadTimeWithURI(String uri) { Url.INSTANCE.domains().add(); } Url.INSTANCE.visits().add(); - } catch (IllegalArgumentException e) { Log.e(LOGTAG, "Invalid URL", e); } + } + + public static void windowsResizeEvent() { + Windows.INSTANCE.resize().add(); + } + + public static void windowsMoveEvent() { + Windows.INSTANCE.movement().add(); + } + public static void activePlacementEvent(int from, boolean active) { + if (active) { + if (from == WindowPlacement.FRONT.getValue()) { + activeWindowTimerId[from] = + Windows.INSTANCE.activeInFrontTime().start(); + } else if (from == WindowPlacement.LEFT.getValue()) { + activeWindowTimerId[from] = + Windows.INSTANCE.activeInLeftTime().start(); + } else if (from == WindowPlacement.RIGHT.getValue()) { + activeWindowTimerId[from] = + Windows.INSTANCE.activeInRightTime().start(); + } else { + Log.d(LOGTAG,"Undefined WindowPlacement type: " + from); + } + } else if (activeWindowTimerId[from] != null) { + if (from == WindowPlacement.FRONT.getValue()) { + Windows.INSTANCE.activeInFrontTime(). + stopAndAccumulate(activeWindowTimerId[from]); + } else if (from == WindowPlacement.LEFT.getValue()) { + Windows.INSTANCE.activeInLeftTime(). + stopAndAccumulate(activeWindowTimerId[from]); + } else if (from == WindowPlacement.RIGHT.getValue()) { + Windows.INSTANCE.activeInRightTime(). + stopAndAccumulate(activeWindowTimerId[from]); + } else { + Log.d(LOGTAG,"Undefined WindowPlacement type: " + from); + } + } + } + + public static void openWindowsEvent(int from, int to, boolean isPrivate) { + if (isPrivate) { + if (from > 0 && openPrivateWindowTimerId[from - 1] != null) { + switch (from) { + case 1: + Windows.INSTANCE.singlePriWindowOpenedTime(). + stopAndAccumulate(openPrivateWindowTimerId[from - 1]); + break; + case 2: + Windows.INSTANCE.doublePriWindowOpenedTime(). + stopAndAccumulate(openPrivateWindowTimerId[from - 1]); + break; + case 3: + Windows.INSTANCE.triplePriWindowOpenedTime(). + stopAndAccumulate(openPrivateWindowTimerId[from - 1]); + break; + default: + Log.d(LOGTAG,"Undefined PriWindowOpenedTime type: " + from); + break; + } + } + if (to > 0) { + String label = ""; + switch (to) { + case 1: + label = "single"; + openPrivateWindowTimerId[to - 1] = + Windows.INSTANCE.singlePriWindowOpenedTime().start(); + break; + case 2: + label = "double"; + openPrivateWindowTimerId[to - 1] = + Windows.INSTANCE.doublePriWindowOpenedTime().start(); + break; + case 3: + label = "triple"; + openPrivateWindowTimerId[to - 1] = + Windows.INSTANCE.triplePriWindowOpenedTime().start(); + break; + default: + Log.d(LOGTAG,"Undefined OpenedPriWindowCount type: " + to); + break; + } + Windows.INSTANCE.getOpenedPriWindowCount().get(label).add(); + } + } else { + if (from > 0 && openWindowTimerId[from - 1] != null) { + switch (from) { + case 1: + Windows.INSTANCE.singleWindowOpenedTime(). + stopAndAccumulate(openWindowTimerId[from - 1]); + break; + case 2: + Windows.INSTANCE.doubleWindowOpenedTime(). + stopAndAccumulate(openWindowTimerId[from - 1]); + break; + case 3: + Windows.INSTANCE.tripleWindowOpenedTime(). + stopAndAccumulate(openWindowTimerId[from - 1]); + break; + default: + Log.d(LOGTAG,"Undefined WindowOpenedTime type: " + from); + break; + } + } + if (to > 0) { + String label = ""; + switch (to) { + case 1: + label = "single"; + openWindowTimerId[to - 1] = + Windows.INSTANCE.singleWindowOpenedTime().start(); + break; + case 2: + label = "double"; + openWindowTimerId[to - 1] = + Windows.INSTANCE.doubleWindowOpenedTime().start(); + break; + case 3: + label = "triple"; + openWindowTimerId[to - 1] = + Windows.INSTANCE.tripleWindowOpenedTime().start(); + break; + default: + Log.d(LOGTAG,"Undefined OpenedWindowCount type: " + to); + break; + } + Windows.INSTANCE.getOpenedWindowCount().get(label).add(); + } + } + } + + public static void resetOpenedWindowsCount(int number, boolean isPrivate) { + if (number == 0) { + return; + } + + String label = ""; + switch (number) { + case 1: + label = "single"; + break; + case 2: + label = "double"; + break; + case 3: + label = "triple"; + break; + default: + Log.d(LOGTAG, String.format("Undefined OpenedWindowCount type: %d, private? %d", + number, isPrivate == true ? 1: 0)); + break; + } + + if (isPrivate) { + Windows.INSTANCE.getOpenedPriWindowCount().get(label).add(); + } else { + Windows.INSTANCE.getOpenedWindowCount().get(label).add(); + } } public static void sessionStop() { domainMap.clear(); - Pings.INSTANCE.sessionEnd().send(); + loadingTimerId.clear(); + windowLifeTimerId.clear(); + activeWindowTimerId = new GleanTimerId[MAX_WINDOWS]; + openWindowTimerId = new GleanTimerId[MAX_WINDOWS]; + openPrivateWindowTimerId = new GleanTimerId[MAX_WINDOWS]; + + Pings.INSTANCE.sessionEnd().submit(); } @UiThread @@ -126,31 +307,26 @@ public static void voiceInputEvent() { } public static void startImmersive() { - // TODO: Blocked by Bug 1595914 and 1595723. - // immersiveTimerId = Durarion.INSTANCE.getImmersiveMode().start(); + immersiveTimerId = Immersive.INSTANCE.duration().start(); } public static void stopImmersive() { - // TODO: Blocked by Bug 1595914 and 1595723. - // Durarion.INSTANCE.getImmersiveMode().stopAndAccumulate(immersiveTimerId); + Immersive.INSTANCE.duration().stopAndAccumulate(immersiveTimerId); } - // TODO: Confirm if we don't need multiple metrics for tracking window open duration. - // like WindowLifetime1 ~ WindowLifetimeN for multiple windows. public static void openWindowEvent(int windowId) { - // TODO: Blocked by Bug 1595914 and Bug 1595723. - // GleanTimerId id = Durarion.INSTANCE.getWindowLifetime().start(); - // windowLifetimeId.put(windowId, id); + GleanTimerId timerId = Windows.INSTANCE.duration().start(); + windowLifeTimerId.put(windowId, timerId); } public static void closeWindowEvent(int windowId) { - // TODO: Blocked by Bug 1595914 and Bug 1595723. - // if (windowLifetimeId.containsKey(windowId)) { - // Durarion.INSTANCE.getWindowLifetime().stopAndAccumulate(windowLifetimeId.get(windowId)); - // windowLifetimeId.remove(windowId); - // } else { - // Log.e(LOGTAG, "Can't find window id."); - // } + if (windowLifeTimerId.containsKey((windowId))) { + GleanTimerId timerId = windowLifeTimerId.get(windowId); + Windows.INSTANCE.duration().stopAndAccumulate(timerId); + windowLifeTimerId.remove(windowId); + } else { + Log.e(LOGTAG, "Can't find close window id."); + } } private static String getDefaultSearchEngineIdentifierForTelemetry() { diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java index 13ea49ecd..fbe0c72e4 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/NavigationBarWidget.java @@ -42,6 +42,7 @@ import org.mozilla.vrbrowser.databinding.NavigationBarBinding; import org.mozilla.vrbrowser.db.SitePermission; import org.mozilla.vrbrowser.search.suggestions.SuggestionsProvider; +import org.mozilla.vrbrowser.telemetry.GleanMetricsService; import org.mozilla.vrbrowser.telemetry.TelemetryWrapper; import org.mozilla.vrbrowser.ui.viewmodel.TrayViewModel; import org.mozilla.vrbrowser.ui.viewmodel.WindowViewModel; @@ -758,6 +759,7 @@ private void exitResizeMode(ResizeAction aResizeAction) { if (aResizeAction == ResizeAction.KEEP_SIZE) { TelemetryWrapper.windowsResizeEvent(); + GleanMetricsService.windowsResizeEvent(); } } diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java index e67aaacbb..d4c383de8 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java @@ -666,14 +666,13 @@ public void disableVRVideoMode() { public void setWindowPlacement(@NonNull Windows.WindowPlacement aPlacement) { if (mActive) { TelemetryWrapper.activePlacementEvent(mWindowPlacement.getValue(), false); + GleanMetricsService.activePlacementEvent(mWindowPlacement.getValue(), false); } - mWindowPlacement = aPlacement; - mViewModel.setPlacement(mWindowPlacement); - if (mActive) { TelemetryWrapper.activePlacementEvent(mWindowPlacement.getValue(), true); + GleanMetricsService.activePlacementEvent(mWindowPlacement.getValue(), true); } } @@ -733,6 +732,7 @@ public void setActiveWindow(boolean active) { hideContextMenus(); TelemetryWrapper.activePlacementEvent(mWindowPlacement.getValue(), mActive); + GleanMetricsService.activePlacementEvent(mWindowPlacement.getValue(), mActive); updateBorder(); mViewModel.setIsActiveWindow(active); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java index 00de03598..e595ae46a 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/Windows.java @@ -510,6 +510,8 @@ public void onResume() { TelemetryWrapper.resetOpenedWindowsCount(mRegularWindows.size(), false); TelemetryWrapper.resetOpenedWindowsCount(mPrivateWindows.size(), true); + GleanMetricsService.resetOpenedWindowsCount(mRegularWindows.size(), false); + GleanMetricsService.resetOpenedWindowsCount(mPrivateWindows.size(), true); } public boolean isPaused() { @@ -791,8 +793,10 @@ private void removeWindow(@NonNull WindowWidget aWindow) { if (mPrivateMode) { TelemetryWrapper.openWindowsEvent(mPrivateWindows.size() + 1, mPrivateWindows.size(), true); + GleanMetricsService.openWindowsEvent(mPrivateWindows.size() + 1, mPrivateWindows.size(), true); } else { TelemetryWrapper.openWindowsEvent(mRegularWindows.size() + 1, mRegularWindows.size(), false); + GleanMetricsService.openWindowsEvent(mRegularWindows.size() + 1, mRegularWindows.size(), false); } } @@ -953,8 +957,10 @@ private WindowWidget createWindow(@Nullable Session aSession) { if (mPrivateMode) { TelemetryWrapper.openWindowsEvent(mPrivateWindows.size() - 1, mPrivateWindows.size(), true); + GleanMetricsService.openWindowsEvent(mPrivateWindows.size() - 1, mPrivateWindows.size(), true); } else { TelemetryWrapper.openWindowsEvent(mRegularWindows.size() - 1, mRegularWindows.size(), false); + GleanMetricsService.openWindowsEvent(mRegularWindows.size() - 1, mRegularWindows.size(), false); } mForcedCurvedMode = getCurrentWindows().size() > 1; @@ -1100,6 +1106,7 @@ public void onMoveLeftClicked(TopBarWidget aWidget) { WindowWidget window = aWidget.getAttachedWindow(); if (window != null) { TelemetryWrapper.windowsMoveEvent(); + GleanMetricsService.windowsMoveEvent(); moveWindowLeft(window); } @@ -1110,6 +1117,7 @@ public void onMoveRightClicked(TopBarWidget aWidget) { WindowWidget window = aWidget.getAttachedWindow(); if (window != null) { TelemetryWrapper.windowsMoveEvent(); + GleanMetricsService.windowsMoveEvent(); moveWindowRight(window); } diff --git a/app/src/test/java/org/mozilla/vrbrowser/GleanMetricsServiceTest.kt b/app/src/test/java/org/mozilla/vrbrowser/GleanMetricsServiceTest.kt index 1bcf0d342..48a2eccc1 100644 --- a/app/src/test/java/org/mozilla/vrbrowser/GleanMetricsServiceTest.kt +++ b/app/src/test/java/org/mozilla/vrbrowser/GleanMetricsServiceTest.kt @@ -8,11 +8,7 @@ import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith import org.mozilla.telemetry.TelemetryHolder -import org.mozilla.vrbrowser.GleanMetrics.Distribution -import org.mozilla.vrbrowser.GleanMetrics.FirefoxAccount -import org.mozilla.vrbrowser.GleanMetrics.LegacyTelemetry -import org.mozilla.vrbrowser.GleanMetrics.Tabs -import org.mozilla.vrbrowser.GleanMetrics.Url +import org.mozilla.vrbrowser.GleanMetrics.* import org.mozilla.vrbrowser.telemetry.GleanMetricsService import org.robolectric.RobolectricTestRunner import org.robolectric.annotation.Config @@ -147,4 +143,114 @@ class GleanMetricsServiceTest { assertTrue(LegacyTelemetry.clientId.testHasValue()) assertEquals(LegacyTelemetry.clientId.testGetValue().toString(), TelemetryHolder.get().getClientId()) } + + fun testPages() { + assertFalse(Pages.pageLoad.testHasValue()) + GleanMetricsService.startPageLoadTime("www.example.com") + assertFalse(Pages.pageLoad.testHasValue()) + GleanMetricsService.stopPageLoadTimeWithURI("www.example.com") + assertTrue(Pages.pageLoad.testHasValue()) + } + + @Test + fun testImmersive() { + assertFalse(Immersive.duration.testHasValue()) + GleanMetricsService.startImmersive() + assertFalse(Immersive.duration.testHasValue()) + GleanMetricsService.stopImmersive() + assertTrue(Immersive.duration.testHasValue()) + } + + @Test + fun testMultiWindow() { + assertFalse(Windows.duration.testHasValue()) + GleanMetricsService.openWindowEvent(1) + assertFalse(Windows.duration.testHasValue()) + GleanMetricsService.closeWindowEvent(1) + assertTrue(Windows.duration.testHasValue()) + + assertFalse(Windows.movement.testHasValue()) + GleanMetricsService.windowsMoveEvent() + assertTrue(Windows.movement.testHasValue()) + assertEquals(Windows.movement.testGetValue(), 1) + + assertFalse(Windows.resize.testHasValue()) + GleanMetricsService.windowsResizeEvent() + assertTrue(Windows.resize.testHasValue()) + assertEquals(Windows.resize.testGetValue(), 1) + + assertFalse(Windows.activeInFrontTime.testHasValue()) + GleanMetricsService.activePlacementEvent(0, true) + assertFalse(Windows.activeInFrontTime.testHasValue()) + GleanMetricsService.activePlacementEvent(0, false) + assertTrue(Windows.activeInFrontTime.testHasValue()) + + assertFalse(Windows.activeInLeftTime.testHasValue()) + GleanMetricsService.activePlacementEvent(1, true) + assertFalse(Windows.activeInLeftTime.testHasValue()) + GleanMetricsService.activePlacementEvent(1, false) + assertTrue(Windows.activeInLeftTime.testHasValue()) + + assertFalse(Windows.activeInRightTime.testHasValue()) + GleanMetricsService.activePlacementEvent(2, true) + assertFalse(Windows.activeInRightTime.testHasValue()) + GleanMetricsService.activePlacementEvent(2, false) + assertTrue(Windows.activeInRightTime.testHasValue()) + + assertFalse(Windows.openedWindowCount["single"].testHasValue()) + assertFalse(Windows.singleWindowOpenedTime.testHasValue()) + GleanMetricsService.openWindowsEvent(0, 1,false) + assertTrue(Windows.openedWindowCount["single"].testHasValue()) + assertEquals(Windows.openedWindowCount["single"].testGetValue(), 1) + assertFalse(Windows.singleWindowOpenedTime.testHasValue()) + assertFalse(Windows.doubleWindowOpenedTime.testHasValue()) + assertFalse(Windows.openedWindowCount["double"].testHasValue()) + GleanMetricsService.openWindowsEvent(1, 2, false) + assertTrue(Windows.openedWindowCount["double"].testHasValue()) + assertEquals(Windows.openedWindowCount["double"].testGetValue(), 1) + assertTrue(Windows.singleWindowOpenedTime.testHasValue()) + assertFalse(Windows.doubleWindowOpenedTime.testHasValue()) + assertFalse(Windows.tripleWindowOpenedTime.testHasValue()) + assertFalse(Windows.openedWindowCount["triple"].testHasValue()) + GleanMetricsService.openWindowsEvent(2, 3, false) + assertTrue(Windows.openedWindowCount["triple"].testHasValue()) + assertEquals(Windows.openedWindowCount["triple"].testGetValue(), 1) + assertTrue(Windows.doubleWindowOpenedTime.testHasValue()) + assertFalse(Windows.tripleWindowOpenedTime.testHasValue()) + GleanMetricsService.openWindowsEvent(3, 2, false) + assertEquals(Windows.openedWindowCount["double"].testGetValue(), 2) + assertTrue(Windows.tripleWindowOpenedTime.testHasValue()) + Pings.sessionEnd.submit(); + // Windows.openedWindowCount will reset when a session is ended. + GleanMetricsService.resetOpenedWindowsCount(2, false) + assertEquals(Windows.openedWindowCount["double"].testGetValue(), 1) + + assertFalse(Windows.openedPriWindowCount["single"].testHasValue()) + assertFalse(Windows.singlePriWindowOpenedTime.testHasValue()) + GleanMetricsService.openWindowsEvent(0, 1,true) + assertTrue(Windows.openedPriWindowCount["single"].testHasValue()) + assertEquals(Windows.openedPriWindowCount["single"].testGetValue(), 1) + assertFalse(Windows.singlePriWindowOpenedTime.testHasValue()) + assertFalse(Windows.doublePriWindowOpenedTime.testHasValue()) + assertFalse(Windows.openedPriWindowCount["double"].testHasValue()) + GleanMetricsService.openWindowsEvent(1, 2, true) + assertTrue(Windows.openedPriWindowCount["double"].testHasValue()) + assertEquals(Windows.openedPriWindowCount["double"].testGetValue(), 1) + assertTrue(Windows.singlePriWindowOpenedTime.testHasValue()) + assertFalse(Windows.doublePriWindowOpenedTime.testHasValue()) + assertFalse(Windows.triplePriWindowOpenedTime.testHasValue()) + assertFalse(Windows.openedPriWindowCount["triple"].testHasValue()) + GleanMetricsService.openWindowsEvent(2, 3, true) + assertTrue(Windows.openedPriWindowCount["triple"].testHasValue()) + assertEquals(Windows.openedPriWindowCount["triple"].testGetValue(), 1) + assertTrue(Windows.doublePriWindowOpenedTime.testHasValue()) + assertFalse(Windows.triplePriWindowOpenedTime.testHasValue()) + GleanMetricsService.openWindowsEvent(3, 2, true) + assertEquals(Windows.openedPriWindowCount["double"].testGetValue(), 2) + assertTrue(Windows.triplePriWindowOpenedTime.testHasValue()) + Pings.sessionEnd.submit(); + // Windows.openedPriWindowCount will reset when a session is ended. + GleanMetricsService.resetOpenedWindowsCount(2, true) + assertEquals(Windows.openedPriWindowCount["double"].testGetValue(), 1) + } } diff --git a/docs/metrics.md b/docs/metrics.md index 38864c4e9..945c3ab78 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -7,25 +7,12 @@ This means you might have to go searching through the dependency tree to get a f # Pings - - [baseline](#baseline) - [deletion-request](#deletion-request) - [events](#events) - [metrics](#metrics) - [session-end](#session-end) -## baseline - -This is a built-in ping that is assembled out of the box by the Glean SDK. - -See the Glean SDK documentation for the [`baseline` ping](https://mozilla.github.io/glean/book/user/pings/baseline.html). - -The following metrics are added to the ping: - -| Name | Type | Description | Data reviews | Extras | Expiration | -| --- | --- | --- | --- | --- | --- | -| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevr, oculusvr, etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | - ## deletion-request The following metrics are added to the ping: @@ -44,7 +31,7 @@ The following metrics are added to the ping: | Name | Type | Description | Data reviews | Extras | Expiration | | --- | --- | --- | --- | --- | --- | -| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevr, oculusvr, etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | +| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevrStore, oculusvr, picovr,etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | firefox_account.sign_in |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The user starts the sign in flow |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | firefox_account.sign_in_result |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |The user finishes the sign in flow |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)|
  • state: The result of the sign in flow. True in case of success, false in case of error
|2020-11-01 | | firefox_account.sign_out |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user pressed the sign out button on the sync account page and was successfully signed out of FxA |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | @@ -59,13 +46,16 @@ The following metrics are added to the ping: | Name | Type | Description | Data reviews | Extras | Expiration | | --- | --- | --- | --- | --- | --- | -| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevr, oculusvr, etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | +| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevrStore, oculusvr, picovr,etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | firefox_account.bookmarks_sync_status |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Bookmarks sync engine status. True means that the bookmarks sync status is enabled, false otherwise. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | firefox_account.history_sync_status |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |History sync engine status. True means that the history sync status is enabled, false otherwise. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | firefox_account.received_tab |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Number of received tabs per day |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)|
  • desktop
  • mobile
  • tablet
  • tv
  • vr
  • unknown
|2020-11-01 | | firefox_account.tab_sent |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Number of tabs successfully sent per day |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | +| immersive.duration |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring if users use WebXR APIs to enter XR immersive mode. How long they stay in this mode. (It starts from users call `navigator.xr.requestSession()` and be ended when the XRSession calls its `end()`.) |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| pages.page_load |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long each page takes to load. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | | searches.counts |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counting how many searches are queried in a specific search engine. The search engine `identifier`s are used as keys for this metric. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | url.query_type |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counting how many URLs are visited in a day, by input method. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)|
  • type_link
  • type_query
  • voice_query
|2020-11-01 | +| windows.duration |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long windows are kept open. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | ## session-end @@ -87,11 +77,24 @@ The following metrics are added to the ping: | Name | Type | Description | Data reviews | Extras | Expiration | | --- | --- | --- | --- | --- | --- | | control.open_new_window |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Counting how many general windows are opened in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2348#issuecomment-564736919), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | -| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevr, oculusvr, etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | +| distribution.channel_name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The distribution channel name of this application. We use this field to recognize Firefox Reality is distributed to which channels, such as wavevrStore, oculusvr, picovr,etc. |[1](https://github.com/MozillaReality/FirefoxReality/pull/1854#issuecomment-546214568), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | tabs.activated |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Number of tabs activated during a session |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | tabs.opened |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Number of tabs opened during a session |[1](https://github.com/MozillaReality/FirefoxReality/pull/2327#issuecomment-559103837), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)|
  • context_menu
  • tabs_dialog
  • bookmarks
  • history
  • fxa_login
  • received
  • pre_existing
  • browser
  • downloads
|2020-11-01 | | url.domains |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Counting how many domains are visited in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | | url.visits |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Counting how many URL links are visited in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/2241#issuecomment-557740258), [2](https://github.com/MozillaReality/FirefoxReality/pull/3199#issuecomment-617938749)||2020-11-01 | +| windows.active_in_front_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |In Firefox Reality, we allow maximum three windows be placed at front, left, and right positions simultaneously. Using this metric to measure how long the front side window is active in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.active_in_left_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |In Firefox Reality, we allow maximum three windows be placed at front, left, and right positions simultaneously. Using this metric to measure how long the left side window is active in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.active_in_right_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |In Firefox Reality, we allow maximum three windows be placed at front, left, and right positions simultaneously. Using this metric to measure how long the right side window is active in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.double_pri_window_opened_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long a user uses double private windows in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.double_window_opened_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long a user uses double windows in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.movement |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Counting how many times of moving a window in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.opened_pri_window_count |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counting which multiple private window mode (single, double, triple) users are using in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)|
  • single
  • double
  • triple
|2020-11-01 | +| windows.opened_window_count |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |Counting which multiple window mode (single, double, triple) users are using in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)|
  • single
  • double
  • triple
|2020-11-01 | +| windows.resize |[counter](https://mozilla.github.io/glean/book/user/metrics/counter.html) |Counting how many times of resizing a window in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.single_pri_window_opened_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long a user uses single private window in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.single_window_opened_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long a user uses single window in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.triple_pri_window_opened_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long a user uses triple private windows in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | +| windows.triple_window_opened_time |[timing_distribution](https://mozilla.github.io/glean/book/user/metrics/timing_distribution.html) |Measuring how long a user uses triple windows in a session. |[1](https://github.com/MozillaReality/FirefoxReality/pull/3430#issuecomment-642823166)||2020-11-01 | diff --git a/versions.gradle b/versions.gradle index ea5f50af4..e1a789bab 100644 --- a/versions.gradle +++ b/versions.gradle @@ -25,7 +25,7 @@ def versions = [:] // GeckoView versions can be found here: // https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/ versions.gecko_view = "79.0.20200604092907" -versions.android_components = "40.0.0" +versions.android_components = "41.0.0" // Note that android-components also depends on application-services, // and in fact is our main source of appservices-related functionality. // The version number below tracks the application-services version