[fenix] Remove total uri count telemetry

pull/600/head
Elise Richards 3 years ago committed by mergify[bot]
parent dd398def06
commit 9c5bb84cb1

@ -178,29 +178,6 @@ events:
notification_emails:
- android-probes@mozilla.com
expires: "2022-04-01"
total_uri_count:
type: counter
description: |
A counter of URIs visited by the user in the current session, including
page reloads. This does not include background page requests and URIs from
embedded pages or private browsing but may be incremented without user
interaction by website scripts that programmatically redirect to a new
location.
send_in_pings:
- metrics
bugs:
- https://github.com/mozilla-mobile/fenix/issues/1301
- https://github.com/mozilla-mobile/fenix/issues/4456
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/1785
- https://github.com/mozilla-mobile/fenix/pull/8314
- https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068
- https://github.com/mozilla-mobile/fenix/pull/19924#issuecomment-861423789
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: "2021-08-01"
normal_and_private_uri_count:
type: counter
description: |

@ -53,7 +53,6 @@ sealed class Event {
object CustomTabsClosed : Event()
object CustomTabsActionTapped : Event()
object CustomTabsMenuOpened : Event()
object UriOpened : Event()
object NormalAndPrivateUriOpened : Event()
object SyncAuthOpened : Event()
object SyncAuthClosed : Event()

@ -240,9 +240,6 @@ private val Event.wrapper: EventWrapper<*>?
is Event.CustomTabsClosed -> EventWrapper<NoExtraKeys>(
{ CustomTab.closed.record(it) }
)
is Event.UriOpened -> EventWrapper<NoExtraKeys>(
{ Events.totalUriCount.add(1) }
)
is Event.NormalAndPrivateUriOpened -> EventWrapper<NoExtraKeys>(
{ Events.normalAndPrivateUriCount.add(1) }
)

@ -51,10 +51,6 @@ class TelemetryMiddleware(
context.state.findTab(action.sessionId)?.let { tab ->
// Record UriOpened event when a non-private page finishes loading
if (tab.content.loading && !action.loading) {
if (!tab.content.private) {
metrics.track(Event.UriOpened)
}
metrics.track(Event.NormalAndPrivateUriOpened)
}
}

@ -178,28 +178,24 @@ class TelemetryMiddlewareTest {
}
@Test
fun `GIVEN a page is loading WHEN loading is complete THEN we record a UriOpened event`() {
fun `GIVEN a normal page is loading WHEN loading is complete THEN we record a UriOpened event`() {
val tab = createTab(id = "1", url = "https://mozilla.org")
store.dispatch(TabListAction.AddTabAction(tab)).joinBlocking()
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, true)).joinBlocking()
verify(exactly = 0) { metrics.track(Event.UriOpened) }
verify(exactly = 0) { metrics.track(Event.NormalAndPrivateUriOpened) }
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, false)).joinBlocking()
verify(exactly = 1) { metrics.track(Event.UriOpened) }
verify(exactly = 1) { metrics.track(Event.NormalAndPrivateUriOpened) }
}
@Test
fun `GIVEN a private page is loading WHEN loading is complete THEN we never record a UriOpened event`() {
fun `GIVEN a private page is loading WHEN loading is complete THEN we record a UriOpened event`() {
val tab = createTab(id = "1", url = "https://mozilla.org", private = true)
store.dispatch(TabListAction.AddTabAction(tab)).joinBlocking()
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, true)).joinBlocking()
verify(exactly = 0) { metrics.track(Event.UriOpened) }
verify(exactly = 0) { metrics.track(Event.NormalAndPrivateUriOpened) }
store.dispatch(ContentAction.UpdateLoadingStateAction(tab.id, false)).joinBlocking()
verify(exactly = 0) { metrics.track(Event.UriOpened) }
verify(exactly = 1) { metrics.track(Event.NormalAndPrivateUriOpened) }
}

Loading…
Cancel
Save