From 8fe4e610d459204614a0d4c09633a3d4b4fa659a Mon Sep 17 00:00:00 2001 From: Bruno Rosa Date: Fri, 28 Apr 2023 21:30:08 -0400 Subject: [PATCH] Bug 1823682 - add Server Knobs validation metric --- app/metrics.yaml | 17 +++++++++++++++++ .../fenix/tabstray/TabsTrayController.kt | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/app/metrics.yaml b/app/metrics.yaml index ba811d343b..2ebedf3fc8 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -9429,6 +9429,23 @@ private_browsing_shortcut_cfr: - android-probes@mozilla.com expires: 122 +server_knobs: + validation: + disabled: true + type: event + description: | + Temporary metric recorded at the same time as + "tabs_tray.new_tab_tapped" to validate that the Glean Server Knobs + functionality is working correctly. + bugs: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1823682 + data_reviews: + - https://bugzilla.mozilla.org/show_bug.cgi?id=1823682#c2 + notification_emails: + - android-probes@mozilla.com + - brosa@mozilla.com + expires: 116 + pull_to_refresh_in_browser: enabled: type: boolean diff --git a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt index 601a8ffe8c..912eeb4920 100644 --- a/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt +++ b/app/src/main/java/org/mozilla/fenix/tabstray/TabsTrayController.kt @@ -28,6 +28,7 @@ import mozilla.telemetry.glean.private.NoExtras import org.mozilla.fenix.BrowserDirection import org.mozilla.fenix.GleanMetrics.Collections import org.mozilla.fenix.GleanMetrics.Events +import org.mozilla.fenix.GleanMetrics.ServerKnobs import org.mozilla.fenix.GleanMetrics.TabsTray import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R @@ -478,6 +479,9 @@ class DefaultTabsTrayController( TabsTray.newPrivateTabTapped.record(NoExtras()) } else { TabsTray.newTabTapped.record(NoExtras()) + + // Temporary recording for validating the Glean Server Knobs functionality. + ServerKnobs.validation.record(NoExtras()) } }