For #6308: Remove unecessary telemetry & bump expiry date (#7793)

* For #6308: Remove unecessary telemetry

* For #6308: Bump expiry date on telemetry
fennec/nightly
Sawyer Blatz 4 years ago committed by liuche
parent e4eba42b93
commit 509fa112d0

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.rusthttp.RustHttpConfig
import mozilla.components.support.rustlog.RustLog
import org.mozilla.fenix.GleanMetrics.ExperimentsMetrics
import org.mozilla.fenix.components.Components
import org.mozilla.fenix.ext.settings
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()
if (settings().isTelemetryEnabled) {
components.analytics.metrics.start()

@ -116,12 +116,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.FindInPageClosed -> EventWrapper<NoExtraKeys>(
{ 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>(
{ FindInPage.searchedPage.record(it) }
)
@ -365,9 +359,8 @@ private val Event.wrapper: EventWrapper<*>?
is Event.PrivateBrowsingStaticShortcutPrivateTab -> EventWrapper<NoExtraKeys>(
{ PrivateBrowsingShortcut.staticShortcutPriv.record(it) }
)
is Event.WhatsNewTapped -> EventWrapper(
{ Events.whatsNewTapped.record(it) },
{ Events.whatsNewTappedKeys.valueOf(it) }
is Event.WhatsNewTapped -> EventWrapper<NoExtraKeys>(
{ Events.whatsNewTapped.record(it) }
)
is Event.TabMediaPlay -> EventWrapper<NoExtraKeys>(
{ Tab.mediaPlay.record(it) }

@ -100,8 +100,6 @@ sealed class Event {
object SearchWidgetVoiceSearchPressed : Event()
object FindInPageOpened : Event()
object FindInPageClosed : Event()
object FindInPageNext : Event()
object FindInPagePrevious : Event()
object FindInPageSearchCommitted : Event()
object PrivateBrowsingGarbageIconTapped : Event()
object PrivateBrowsingSnackbarUndoTapped : Event()
@ -140,6 +138,7 @@ sealed class Event {
object CustomEngineAdded : Event()
object CustomEngineDeleted : Event()
object PrivateBrowsingShowSearchSuggestions : Event()
object WhatsNewTapped : Event()
// Interaction events with extras
@ -196,12 +195,6 @@ sealed class Event {
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() {
override val extras: Map<Collections.saveButtonKeys, String>?
get() = mapOf(Collections.saveButtonKeys.fromScreen to fromScreen)
@ -351,8 +344,6 @@ sealed class Event {
}
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.INPUT -> Event.FindInPageSearchCommitted
Component.FEATURE_CONTEXTMENU to ContextMenuFacts.Items.ITEM -> {

@ -536,7 +536,7 @@ class HomeFragment : Fragment() {
invokePendingDeleteJobs()
hideOnboardingIfNeeded()
WhatsNew.userViewedWhatsNew(context)
context.metrics.track(Event.WhatsNewTapped(Event.WhatsNewTapped.Source.HOME))
context.metrics.track(Event.WhatsNewTapped)
(activity as HomeActivity).openToBrowserAndLoad(
searchTermOrURL = SupportUtils.getWhatsNewUrl(context),
newTab = true,

@ -151,7 +151,7 @@ class AboutFragment : Fragment(), AboutPageListener {
is AboutItem.ExternalLink -> {
if (item.type == WHATS_NEW) {
WhatsNew.userViewedWhatsNew(requireContext())
requireComponents.analytics.metrics.track(Event.WhatsNewTapped(Event.WhatsNewTapped.Source.ABOUT))
requireComponents.analytics.metrics.track(Event.WhatsNewTapped)
}
openLinkInCustomTab(item.url)

@ -86,11 +86,9 @@ The following metrics are added to the ping:
| events.performed_search |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user performed a search |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673), [2](https://github.com/mozilla-mobile/fenix/pull/1677)|<ul><li>source: A string that tells us how the user performed the search. Possible values are: * default.action * default.suggestion * shortcut.action * shortcut.suggestion </li></ul>|2020-03-01 |
| events.preference_toggled |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user toggled a boolean preference in settings |[1](https://github.com/mozilla-mobile/fenix/pull/1896), [2](https://github.com/mozilla-mobile/fenix/pull/5704), [3](https://github.com/mozilla-mobile/fenix/pull/5886), [4](https://github.com/mozilla-mobile/fenix/pull/5975), [5](https://github.com/mozilla-mobile/fenix/pull/6352), [6](https://github.com/mozilla-mobile/fenix/pull/6601), [7](https://github.com/mozilla-mobile/fenix/pull/6746)|<ul><li>enabled: Whether or not the preference is *now* enabled</li><li>preference_key: The preference key for the boolean (true/false) preference the user toggled. We currently track: show_search_suggestions, remote_debugging, telemetry, tracking_protection, search_bookmarks, search_browsing_history, show_clipboard_suggestions, show_search_shortcuts, open_links_in_a_private_tab (bug in implementation https://github.com/mozilla-mobile/fenix/issues/7384), pref_key_sync_logins, pref_key_sync_bookmarks, pref_key_sync_history and pref_key_show_search_suggestions_in_private</li></ul>|2020-03-01 |
| events.search_bar_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user tapped the search bar |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673)|<ul><li>source: The view the user was on when they initiated the search (For example: `Home` or `Browser`)</li></ul>|2020-03-01 |
| events.whats_new_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the "what's new" page button |[1](https://github.com/mozilla-mobile/fenix/pull/5090)|<ul><li>source: The location from which the user selected the what's new button. Either 'about' or 'home'</li></ul>|2020-03-01 |
| events.whats_new_tapped |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the "what's new" page button |[1](https://github.com/mozilla-mobile/fenix/pull/5090)||2020-03-01 |
| find_in_page.closed |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user closed the find in page UI |[1](https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010)||2020-03-01 |
| find_in_page.next_result |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user clicked the "next result" button |[1](https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010)||2020-03-01 |
| find_in_page.opened |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the find in page UI |[1](https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010)||2020-03-01 |
| find_in_page.previous_result |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user clicked the "previous result" button |[1](https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010)||2020-03-01 |
| find_in_page.searched_page |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user searched the page |[1](https://github.com/mozilla-mobile/fenix/pull/1344#issuecomment-479285010)||2020-03-01 |
| history.opened |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened the history screen |[1](https://github.com/mozilla-mobile/fenix/pull/3940)||2020-03-01 |
| history.opened_item |[event](https://mozilla.github.io/glean/book/user/metrics/event.html) |A user opened a history item |[1](https://github.com/mozilla-mobile/fenix/pull/3940)||2020-03-01 |
@ -166,7 +164,6 @@ The following metrics are added to the ping:
| Name | Type | Description | Data reviews | Extras | Expiration |
| --- | --- | --- | --- | --- | --- |
| experiments.metrics.active_experiment |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |Records the branch name of the active experiment, if the client is enrolled in the `fenix-test-2019-08-05` experiment. This is intended to validate that the service-experiments library properly matches clients to experiments and can take action based on a multi-branched experiment. This is done by recording the experiment branch name in this string metric which allows the experiment to be transparent and unobtrusive to the user. |[1](https://bugzilla.mozilla.org/show_bug.cgi?id=1543986#c4)||2019-11-01 |
| metrics.adjust_campaign |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |A string containing the Adjust campaign ID from which the user installed Fenix. This will not send on the first session the user runs. If the install is organic, this will be empty. |[1](https://github.com/mozilla-mobile/fenix/pull/5579)||2020-03-01 |
| metrics.default_browser |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |Is Fenix the default browser? |[1](https://github.com/mozilla-mobile/fenix/pull/1067#issuecomment-474598673)||2020-03-01 |
| metrics.default_moz_browser |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |The name of the default browser on device if and only if it's a Mozilla owned product |[1](https://github.com/mozilla-mobile/fenix/pull/1953/), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 |

Loading…
Cancel
Save