From 284f3cf0f500d7e669ae6faa736cc853854efea2 Mon Sep 17 00:00:00 2001 From: Sawyer Blatz Date: Wed, 6 Nov 2019 19:10:56 -0800 Subject: [PATCH] For #4456: Updates total_uri_count upload (#6482) --- app/metrics.yaml | 2 +- app/src/main/java/org/mozilla/fenix/FenixApplication.kt | 2 -- .../org/mozilla/fenix/components/metrics/GleanMetricsService.kt | 2 ++ docs/metrics.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/metrics.yaml b/app/metrics.yaml index cb5fd6a35..1c3ba9973 100644 --- a/app/metrics.yaml +++ b/app/metrics.yaml @@ -436,7 +436,7 @@ metrics: bugs: - https://github.com/mozilla-mobile/fenix/issue/4456 data_reviews: - - https://github.com/mozilla-mobile/fenix/pull/TODO + - https://github.com/mozilla-mobile/fenix/pull/6003 notification_emails: - fenix-core@mozilla.com expires: "2020-03-01" diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index cf7f8cdb3..ff950f154 100644 --- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -64,8 +64,6 @@ open class FenixApplication : Application() { registerRxExceptionHandling() enableStrictMode() - applicationContext.settings().totalUriCount = 0 - if (!isMainProcess()) { // If this is not the main process then do not continue with the initialization here. Everything that // follows only needs to be done in our app's main process and should not be done in other processes like diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt index 7d451bd72..a73cf3233 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/GleanMetricsService.kt @@ -460,6 +460,8 @@ class GleanMetricsService(private val context: Context) : MetricsService { } setStartupMetrics() + + context.settings().totalUriCount = 0 } internal fun setStartupMetrics() { diff --git a/docs/metrics.md b/docs/metrics.md index 864d4a388..ae40ced46 100644 --- a/docs/metrics.md +++ b/docs/metrics.md @@ -161,7 +161,7 @@ The following metrics are added to the ping: | 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 | | metrics.mozilla_products |[string_list](https://mozilla.github.io/glean/book/user/metrics/string_list.html) |A list of all the Mozilla products installed on device. We currently scan for: Firefox, Firefox Beta, Firefox Aurora, Firefox Nightly, Firefox Fdroid, Firefox Lite, Reference Browser, Reference Browser Debug, Fenix, Focus, and Lockwise. |[1](https://github.com/mozilla-mobile/fenix/pull/1953/), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 | | metrics.search_count |[labeled_counter](https://mozilla.github.io/glean/book/user/metrics/labeled_counters.html) |The labels for this counter are `.`. If the search engine is bundled with Fenix `search-engine-name` will be the name of the search engine. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be `custom`. `source` will either be `action` or `suggestion` |[1](https://github.com/mozilla-mobile/fenix/pull/1677), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 | -| metrics.total_uri_count |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |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. |[1](https://github.com/mozilla-mobile/fenix/pull/TODO)||2020-03-01 | +| metrics.total_uri_count |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |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. |[1](https://github.com/mozilla-mobile/fenix/pull/6003)||2020-03-01 | | search.default_engine.code |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be the search engine identifier. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[1](https://github.com/mozilla-mobile/fenix/pull/1606), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 | | search.default_engine.name |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be the search engine name. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[1](https://github.com/mozilla-mobile/fenix/pull/1606), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 | | search.default_engine.submission_url |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |If the search engine is pre-loaded with Fenix this value will be he base URL we use to build the search query for the search engine. For example: https://mysearchengine.com/?query=%s. If it's a custom search engine (defined: https://github.com/mozilla-mobile/fenix/issues/1607) the value will be "custom" |[1](https://github.com/mozilla-mobile/fenix/pull/1606), [2](https://github.com/mozilla-mobile/fenix/pull/5216)||2020-03-01 |