* For #6308: Remove unecessary telemetry * For #6308: Bump expiry date on telemetrymaster
parent
e4eba42b93
commit
509fa112d0
302
app/metrics.yaml
302
app/metrics.yaml
File diff suppressed because it is too large
Load Diff
|
@ -31,7 +31,6 @@ import mozilla.components.support.ktx.android.content.runOnlyInMainProcess
|
||||||
import mozilla.components.support.locale.LocaleAwareApplication
|
import mozilla.components.support.locale.LocaleAwareApplication
|
||||||
import mozilla.components.support.rusthttp.RustHttpConfig
|
import mozilla.components.support.rusthttp.RustHttpConfig
|
||||||
import mozilla.components.support.rustlog.RustLog
|
import mozilla.components.support.rustlog.RustLog
|
||||||
import org.mozilla.fenix.GleanMetrics.ExperimentsMetrics
|
|
||||||
import org.mozilla.fenix.components.Components
|
import org.mozilla.fenix.components.Components
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
import org.mozilla.fenix.session.NotificationSessionObserver
|
import org.mozilla.fenix.session.NotificationSessionObserver
|
||||||
|
@ -122,16 +121,6 @@ open class FenixApplication : LocaleAwareApplication() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When the `fenix-test-2019-08-05` experiment is active, record its branch in Glean
|
|
||||||
// telemetry. This will be used to validate that the experiment system correctly enrolls
|
|
||||||
// clients and segments them into branches. Note that this will not take effect the first
|
|
||||||
// time the application has launched, since there won't be enough time for the experiments
|
|
||||||
// library to get a list of experiments. It will take effect the second time the
|
|
||||||
// application is launched.
|
|
||||||
Experiments.withExperiment("fenix-test-2019-08-05") { branchName ->
|
|
||||||
ExperimentsMetrics.activeExperiment.set(branchName)
|
|
||||||
}
|
|
||||||
|
|
||||||
setupLeakCanary()
|
setupLeakCanary()
|
||||||
if (settings().isTelemetryEnabled) {
|
if (settings().isTelemetryEnabled) {
|
||||||
components.analytics.metrics.start()
|
components.analytics.metrics.start()
|
||||||
|
|
|
@ -116,12 +116,6 @@ private val Event.wrapper: EventWrapper<*>?
|
||||||
is Event.FindInPageClosed -> EventWrapper<NoExtraKeys>(
|
is Event.FindInPageClosed -> EventWrapper<NoExtraKeys>(
|
||||||
{ FindInPage.closed.record(it) }
|
{ FindInPage.closed.record(it) }
|
||||||
)
|
)
|
||||||
is Event.FindInPageNext -> EventWrapper<NoExtraKeys>(
|
|
||||||
{ FindInPage.nextResult.record(it) }
|
|
||||||
)
|
|
||||||
is Event.FindInPagePrevious -> EventWrapper<NoExtraKeys>(
|
|
||||||
{ FindInPage.previousResult.record(it) }
|
|
||||||
)
|
|
||||||
is Event.FindInPageSearchCommitted -> EventWrapper<NoExtraKeys>(
|
is Event.FindInPageSearchCommitted -> EventWrapper<NoExtraKeys>(
|
||||||
{ FindInPage.searchedPage.record(it) }
|
{ FindInPage.searchedPage.record(it) }
|
||||||
)
|
)
|
||||||
|
@ -365,9 +359,8 @@ private val Event.wrapper: EventWrapper<*>?
|
||||||
is Event.PrivateBrowsingStaticShortcutPrivateTab -> EventWrapper<NoExtraKeys>(
|
is Event.PrivateBrowsingStaticShortcutPrivateTab -> EventWrapper<NoExtraKeys>(
|
||||||
{ PrivateBrowsingShortcut.staticShortcutPriv.record(it) }
|
{ PrivateBrowsingShortcut.staticShortcutPriv.record(it) }
|
||||||
)
|
)
|
||||||
is Event.WhatsNewTapped -> EventWrapper(
|
is Event.WhatsNewTapped -> EventWrapper<NoExtraKeys>(
|
||||||
{ Events.whatsNewTapped.record(it) },
|
{ Events.whatsNewTapped.record(it) }
|
||||||
{ Events.whatsNewTappedKeys.valueOf(it) }
|
|
||||||
)
|
)
|
||||||
is Event.TabMediaPlay -> EventWrapper<NoExtraKeys>(
|
is Event.TabMediaPlay -> EventWrapper<NoExtraKeys>(
|
||||||
{ Tab.mediaPlay.record(it) }
|
{ Tab.mediaPlay.record(it) }
|
||||||
|
|
|
@ -100,8 +100,6 @@ sealed class Event {
|
||||||
object SearchWidgetVoiceSearchPressed : Event()
|
object SearchWidgetVoiceSearchPressed : Event()
|
||||||
object FindInPageOpened : Event()
|
object FindInPageOpened : Event()
|
||||||
object FindInPageClosed : Event()
|
object FindInPageClosed : Event()
|
||||||
object FindInPageNext : Event()
|
|
||||||
object FindInPagePrevious : Event()
|
|
||||||
object FindInPageSearchCommitted : Event()
|
object FindInPageSearchCommitted : Event()
|
||||||
object PrivateBrowsingGarbageIconTapped : Event()
|
object PrivateBrowsingGarbageIconTapped : Event()
|
||||||
object PrivateBrowsingSnackbarUndoTapped : Event()
|
object PrivateBrowsingSnackbarUndoTapped : Event()
|
||||||
|
@ -140,6 +138,7 @@ sealed class Event {
|
||||||
object CustomEngineAdded : Event()
|
object CustomEngineAdded : Event()
|
||||||
object CustomEngineDeleted : Event()
|
object CustomEngineDeleted : Event()
|
||||||
object PrivateBrowsingShowSearchSuggestions : Event()
|
object PrivateBrowsingShowSearchSuggestions : Event()
|
||||||
|
object WhatsNewTapped : Event()
|
||||||
|
|
||||||
// Interaction events with extras
|
// Interaction events with extras
|
||||||
|
|
||||||
|
@ -196,12 +195,6 @@ sealed class Event {
|
||||||
get() = hashMapOf(Events.appOpenedKeys.source to source.name)
|
get() = hashMapOf(Events.appOpenedKeys.source to source.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
data class WhatsNewTapped(val source: Source) : Event() {
|
|
||||||
enum class Source { ABOUT, HOME }
|
|
||||||
override val extras: Map<Events.whatsNewTappedKeys, String>?
|
|
||||||
get() = hashMapOf(Events.whatsNewTappedKeys.source to source.name)
|
|
||||||
}
|
|
||||||
|
|
||||||
data class CollectionSaveButtonPressed(val fromScreen: String) : Event() {
|
data class CollectionSaveButtonPressed(val fromScreen: String) : Event() {
|
||||||
override val extras: Map<Collections.saveButtonKeys, String>?
|
override val extras: Map<Collections.saveButtonKeys, String>?
|
||||||
get() = mapOf(Collections.saveButtonKeys.fromScreen to fromScreen)
|
get() = mapOf(Collections.saveButtonKeys.fromScreen to fromScreen)
|
||||||
|
@ -351,8 +344,6 @@ sealed class Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Fact.toEvent(): Event? = when (Pair(component, item)) {
|
private fun Fact.toEvent(): Event? = when (Pair(component, item)) {
|
||||||
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.PREVIOUS -> Event.FindInPagePrevious
|
|
||||||
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.NEXT -> Event.FindInPageNext
|
|
||||||
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.CLOSE -> Event.FindInPageClosed
|
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.CLOSE -> Event.FindInPageClosed
|
||||||
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.INPUT -> Event.FindInPageSearchCommitted
|
Component.FEATURE_FINDINPAGE to FindInPageFacts.Items.INPUT -> Event.FindInPageSearchCommitted
|
||||||
Component.FEATURE_CONTEXTMENU to ContextMenuFacts.Items.ITEM -> {
|
Component.FEATURE_CONTEXTMENU to ContextMenuFacts.Items.ITEM -> {
|
||||||
|
|
|
@ -536,7 +536,7 @@ class HomeFragment : Fragment() {
|
||||||
invokePendingDeleteJobs()
|
invokePendingDeleteJobs()
|
||||||
hideOnboardingIfNeeded()
|
hideOnboardingIfNeeded()
|
||||||
WhatsNew.userViewedWhatsNew(context)
|
WhatsNew.userViewedWhatsNew(context)
|
||||||
context.metrics.track(Event.WhatsNewTapped(Event.WhatsNewTapped.Source.HOME))
|
context.metrics.track(Event.WhatsNewTapped)
|
||||||
(activity as HomeActivity).openToBrowserAndLoad(
|
(activity as HomeActivity).openToBrowserAndLoad(
|
||||||
searchTermOrURL = SupportUtils.getWhatsNewUrl(context),
|
searchTermOrURL = SupportUtils.getWhatsNewUrl(context),
|
||||||
newTab = true,
|
newTab = true,
|
||||||
|
|
|
@ -151,7 +151,7 @@ class AboutFragment : Fragment(), AboutPageListener {
|
||||||
is AboutItem.ExternalLink -> {
|
is AboutItem.ExternalLink -> {
|
||||||
if (item.type == WHATS_NEW) {
|
if (item.type == WHATS_NEW) {
|
||||||
WhatsNew.userViewedWhatsNew(requireContext())
|
WhatsNew.userViewedWhatsNew(requireContext())
|
||||||
requireComponents.analytics.metrics.track(Event.WhatsNewTapped(Event.WhatsNewTapped.Source.ABOUT))
|
requireComponents.analytics.metrics.track(Event.WhatsNewTapped)
|
||||||
}
|
}
|
||||||
|
|
||||||
openLinkInCustomTab(item.url)
|
openLinkInCustomTab(item.url)
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue