Commit bf71f993 authored by Elise Richards's avatar Elise Richards Committed by mergify[bot]
Browse files

No issue: fix glean metrics tests for expired metrics (#20621)

* Remove references to preferences.open_links_in_private and preferences.private_search_suggestions in tests. These metrics have been expired and may be removed.

* Add ignores for performance metrics that have expired.

* Remove tabs_tray.cfr.dismiss and tabs_tray.cfr.go_to_settings telemetry probes.

* Remove metrics controller from signature and remove in tests
parent 65e65e60
Loading
Loading
Loading
Loading
+0 −32
Original line number Diff line number Diff line
@@ -2650,38 +2650,6 @@ reader_mode:
      - android-probes@mozilla.com
    expires: "2022-02-01"

tabs_tray.cfr:
  dismiss:
    type: event
    description: |
      A user dismisses the tabs tray CFR.
    bugs:
      - https://github.com/mozilla-mobile/fenix/issues/16485
    data_reviews:
      - https://github.com/mozilla-mobile/fenix/pull/17442
      - https://github.com/mozilla-mobile/fenix/issues/16485#issuecomment-759641324
      - https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
    data_sensitivity:
      - interaction
    notification_emails:
      - android-probes@mozilla.com
    expires: "2021-08-01"
  go_to_settings:
    type: event
    description: |
      A user selects the CFR option to navigate to settings.
    bugs:
      - https://github.com/mozilla-mobile/fenix/issues/16485
    data_reviews:
      - https://github.com/mozilla-mobile/fenix/pull/17442
      - https://github.com/mozilla-mobile/fenix/issues/16485#issuecomment-759641324
      - https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
    data_sensitivity:
      - interaction
    notification_emails:
      - android-probes@mozilla.com
    expires: "2021-08-01"

tabs_tray:
  opened:
    type: event
+0 −2
Original line number Diff line number Diff line
@@ -190,8 +190,6 @@ sealed class Event {
    object TabsTraySaveToCollectionPressed : Event()
    object TabsTrayShareAllTabsPressed : Event()
    object TabsTrayCloseAllTabsPressed : Event()
    object TabsTrayCfrDismissed : Event()
    object TabsTrayCfrTapped : Event()

    object ProgressiveWebAppOpenFromHomescreenTap : Event()
    object ProgressiveWebAppInstallAsShortcut : Event()
+0 −7
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ import org.mozilla.fenix.GleanMetrics.SyncedTabs
import org.mozilla.fenix.GleanMetrics.Tab
import org.mozilla.fenix.GleanMetrics.Tabs
import org.mozilla.fenix.GleanMetrics.TabsTray
import org.mozilla.fenix.GleanMetrics.TabsTrayCfr
import org.mozilla.fenix.GleanMetrics.Tip
import org.mozilla.fenix.GleanMetrics.ToolbarSettings
import org.mozilla.fenix.GleanMetrics.TopSites
@@ -700,12 +699,6 @@ private val Event.wrapper: EventWrapper<*>?
        is Event.TabsTrayCloseAllTabsPressed -> EventWrapper<NoExtraKeys>(
            { TabsTray.closeAllTabs.record(it) }
        )
        is Event.TabsTrayCfrDismissed -> EventWrapper<NoExtraKeys>(
            { TabsTrayCfr.dismiss.record(it) }
        )
        is Event.TabsTrayCfrTapped -> EventWrapper<NoExtraKeys>(
            { TabsTrayCfr.goToSettings.record(it) }
        )
        is Event.AutoPlaySettingVisited -> EventWrapper<NoExtraKeys>(
            { Autoplay.visitedSetting.record(it) }
        )
+1 −2
Original line number Diff line number Diff line
@@ -202,8 +202,7 @@ class TabsTrayFragment : AppCompatDialogFragment() {
                store = requireComponents.core.store,
                infoBannerView = view.info_banner,
                settings = requireComponents.settings,
                navigationInteractor = navigationInteractor,
                metrics = requireComponents.analytics.metrics
                navigationInteractor = navigationInteractor
            ),
            owner = this,
            view = view
+1 −6
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@ import mozilla.components.lib.state.helpers.AbstractBinding
import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
import org.mozilla.fenix.R
import org.mozilla.fenix.browser.infobanner.InfoBanner
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.metrics.MetricController
import org.mozilla.fenix.utils.Settings

@OptIn(ExperimentalCoroutinesApi::class)
@@ -31,8 +29,7 @@ class TabsTrayInfoBannerBinding(
    store: BrowserStore,
    private val infoBannerView: ViewGroup,
    private val settings: Settings,
    private val navigationInteractor: NavigationInteractor,
    private val metrics: MetricController?
    private val navigationInteractor: NavigationInteractor
) : AbstractBinding<BrowserState>(store) {

    @VisibleForTesting
@@ -70,12 +67,10 @@ class TabsTrayInfoBannerBinding(
                container = infoBannerView,
                dismissByHiding = true,
                dismissAction = {
                    metrics?.track(Event.TabsTrayCfrDismissed)
                    settings.shouldShowAutoCloseTabsBanner = false
                }
            ) {
                navigationInteractor.onTabSettingsClicked()
                metrics?.track(Event.TabsTrayCfrTapped)
                settings.shouldShowAutoCloseTabsBanner = false
            }
        } else {
Loading