For #21313: Remove expiring/unused metrics for December (#21789)

* Remove crash reporter metrics

* Remove tab counter menu item probe

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
upstream-sync
Elise Richards 3 years ago committed by GitHub
parent 76bb0c3b37
commit 4f55f16bd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -300,30 +300,6 @@ events:
- android-probes@mozilla.com
- erichards@mozilla.com
expires: never
tab_counter_menu_action:
type: event
description:
A tab counter menu item was tapped
extra_keys:
item:
description: |
A string containing the name of the item the user tapped. These items
are:
New tab, New private tab, Close tab
bugs:
- https://github.com/mozilla-mobile/fenix/issues/11442
- https://github.com/mozilla-mobile/fenix/issues/19923
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/11533
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-12-01"
synced_tab_opened:
type: event
description: |
@ -620,47 +596,6 @@ toolbar_settings:
- android-probes@mozilla.com
expires: "2022-02-01"
crash_reporter:
opened:
type: event
description: |
The crash reporter was displayed
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1040
- https://github.com/mozilla-mobile/fenix/issues/19923
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1214#issue-264756708
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-12-01"
closed:
type: event
description: |
The crash reporter was closed
extra_keys:
crash_submitted:
description: |
A boolean that tells us whether or not the user submitted a crash
report
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1040
- https://github.com/mozilla-mobile/fenix/issues/19923
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1214#issue-264756708
- https://github.com/mozilla-mobile/fenix/pull/13958#issuecomment-676857877
- https://github.com/mozilla-mobile/fenix/pull/18143
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-12-01"
context_menu:
item_tapped:
type: event

@ -14,7 +14,6 @@ import org.mozilla.fenix.GleanMetrics.AppTheme
import org.mozilla.fenix.GleanMetrics.Autoplay
import org.mozilla.fenix.GleanMetrics.Collections
import org.mozilla.fenix.GleanMetrics.ContextMenu
import org.mozilla.fenix.GleanMetrics.CrashReporter
import org.mozilla.fenix.GleanMetrics.ErrorPage
import org.mozilla.fenix.GleanMetrics.Events
import org.mozilla.fenix.GleanMetrics.History
@ -619,14 +618,8 @@ sealed class Event {
}
}
object CrashReporterOpened : Event()
data class AddonInstalled(val addonId: String) : Event()
data class CrashReporterClosed(val crashSubmitted: Boolean) : Event() {
override val extras: Map<CrashReporter.closedKeys, String>?
get() = mapOf(CrashReporter.closedKeys.crashSubmitted to crashSubmitted.toString())
}
data class BrowserMenuItemTapped(val item: Item) : Event() {
enum class Item {
SETTINGS, HELP, DESKTOP_VIEW_ON, DESKTOP_VIEW_OFF, FIND_IN_PAGE, NEW_TAB,
@ -640,15 +633,6 @@ sealed class Event {
get() = mapOf(Events.browserMenuActionKeys.item to item.toString().lowercase(Locale.ROOT))
}
data class TabCounterMenuItemTapped(val item: Item) : Event() {
enum class Item {
NEW_TAB, NEW_PRIVATE_TAB, CLOSE_TAB
}
override val extras: Map<Events.tabCounterMenuActionKeys, String>?
get() = mapOf(Events.tabCounterMenuActionKeys.item to item.toString().lowercase(Locale.ROOT))
}
object AutoPlaySettingVisited : Event()
data class AutoPlaySettingChanged(val setting: AutoplaySetting) : Event() {

@ -19,7 +19,6 @@ import org.mozilla.fenix.GleanMetrics.BrowserSearch
import org.mozilla.fenix.GleanMetrics.Collections
import org.mozilla.fenix.GleanMetrics.ContextMenu
import org.mozilla.fenix.GleanMetrics.ContextualMenu
import org.mozilla.fenix.GleanMetrics.CrashReporter
import org.mozilla.fenix.GleanMetrics.CreditCards
import org.mozilla.fenix.GleanMetrics.CustomTab
import org.mozilla.fenix.GleanMetrics.CustomizeHome
@ -158,13 +157,6 @@ private val Event.wrapper: EventWrapper<*>?
{ ContextMenu.itemTapped.record(it) },
{ ContextMenu.itemTappedKeys.valueOf(it) }
)
is Event.CrashReporterOpened -> EventWrapper<NoExtraKeys>(
{ CrashReporter.opened.record(it) }
)
is Event.CrashReporterClosed -> EventWrapper(
{ CrashReporter.closed.record(it) },
{ CrashReporter.closedKeys.valueOf(it) }
)
is Event.BrowserMenuItemTapped -> EventWrapper(
{ Events.browserMenuAction.record(it) },
{ Events.browserMenuActionKeys.valueOf(it) }
@ -544,10 +536,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.VoiceSearchTapped -> EventWrapper<NoExtraKeys>(
{ VoiceSearch.tapped.record(it) }
)
is Event.TabCounterMenuItemTapped -> EventWrapper(
{ Events.tabCounterMenuAction.record(it) },
{ Events.tabCounterMenuActionKeys.valueOf(it) }
)
is Event.OnboardingPrivacyNotice -> EventWrapper<NoExtraKeys>(
{ Onboarding.privacyNotice.record(it) }
)

@ -126,9 +126,6 @@ class DefaultBrowserToolbarController(
override fun handleTabCounterItemInteraction(item: TabCounterMenu.Item) {
when (item) {
is TabCounterMenu.Item.CloseTab -> {
metrics.track(
Event.TabCounterMenuItemTapped(Event.TabCounterMenuItemTapped.Item.CLOSE_TAB)
)
store.state.selectedTab?.let {
// When closing the last tab we must show the undo snackbar in the home fragment
if (store.state.getNormalOrPrivateTabs(it.content.private).count() == 1) {
@ -143,20 +140,12 @@ class DefaultBrowserToolbarController(
}
}
is TabCounterMenu.Item.NewTab -> {
metrics.track(
Event.TabCounterMenuItemTapped(Event.TabCounterMenuItemTapped.Item.NEW_TAB)
)
activity.browsingModeManager.mode = BrowsingMode.Normal
navController.navigate(
BrowserFragmentDirections.actionGlobalHome(focusOnAddressBar = true)
)
}
is TabCounterMenu.Item.NewPrivateTab -> {
metrics.track(
Event.TabCounterMenuItemTapped(
Event.TabCounterMenuItemTapped.Item.NEW_PRIVATE_TAB
)
)
activity.browsingModeManager.mode = BrowsingMode.Private
navController.navigate(
BrowserFragmentDirections.actionGlobalHome(focusOnAddressBar = true)

@ -4,6 +4,7 @@
package org.mozilla.fenix.crashes
import android.util.Log
import androidx.navigation.NavController
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
@ -13,7 +14,6 @@ import kotlinx.coroutines.launch
import mozilla.components.lib.crash.Crash
import org.mozilla.fenix.R
import org.mozilla.fenix.components.Components
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.utils.Settings
@ -25,10 +25,6 @@ class CrashReporterController(
private val settings: Settings
) {
init {
components.analytics.metrics.track(Event.CrashReporterOpened)
}
/**
* Closes the crash reporter fragment and tries to recover the session.
*
@ -82,7 +78,7 @@ class CrashReporterController(
false
}
components.analytics.metrics.track(Event.CrashReporterClosed(didSubmitReport))
Log.i("Crash Reporter", "Report submitted: $didSubmitReport")
return job
}
}

@ -15,7 +15,6 @@ import org.junit.Before
import org.junit.Test
import org.mozilla.fenix.R
import org.mozilla.fenix.components.Components
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.utils.Settings
@ -40,19 +39,11 @@ class CrashReporterControllerTest {
every { currentDest.id } returns R.id.crashReporterFragment
}
@Test
fun `reports crash reporter opened`() {
CrashReporterController(crash, sessionId, navContoller, components, settings)
verify { components.analytics.metrics.track(Event.CrashReporterOpened) }
}
@Test
fun `handle close and restore tab`() {
val controller = CrashReporterController(crash, sessionId, navContoller, components, settings)
controller.handleCloseAndRestore(sendCrash = false)?.joinBlocking()
verify { components.analytics.metrics.track(Event.CrashReporterClosed(false)) }
verify { components.useCases.sessionUseCases.crashRecovery.invoke() }
verify { navContoller.popBackStack() }
}
@ -62,7 +53,6 @@ class CrashReporterControllerTest {
val controller = CrashReporterController(crash, sessionId, navContoller, components, settings)
controller.handleCloseAndRemove(sendCrash = false)?.joinBlocking()
verify { components.analytics.metrics.track(Event.CrashReporterClosed(false)) }
verify { components.useCases.tabsUseCases.removeTab(sessionId) }
verify { components.useCases.sessionUseCases.crashRecovery.invoke() }
verify {
@ -77,7 +67,9 @@ class CrashReporterControllerTest {
val controller = CrashReporterController(crash, sessionId, navContoller, components, settings)
controller.handleCloseAndRestore(sendCrash = true)?.joinBlocking()
verify { components.analytics.metrics.track(Event.CrashReporterClosed(false)) }
verify(exactly = 0) {
components.analytics.crashReporter.submitReport(crash)
}
}
@Test
@ -87,7 +79,8 @@ class CrashReporterControllerTest {
val controller = CrashReporterController(crash, sessionId, navContoller, components, settings)
controller.handleCloseAndRestore(sendCrash = true)?.joinBlocking()
verify { components.analytics.crashReporter.submitReport(crash) }
verify { components.analytics.metrics.track(Event.CrashReporterClosed(true)) }
verify {
components.analytics.crashReporter.submitReport(crash)
}
}
}

Loading…
Cancel
Save