Closes #16075: Add distribution_id in telemetry startup metrics (#16821)

(cherry picked from commit ca605d8a95)
pull/257/head
Roger Yang 3 years ago committed by Sebastian Kaspari
parent 5b5e93d771
commit 830cf52e88

@ -685,6 +685,23 @@ metrics:
notification_emails:
- fenix-core@mozilla.com
expires: "2021-08-01"
distribution_id:
type: string
lifetime: application
description: |
A string containing the distribution identifier. This is currently used
to identify installs from Mozilla Online.
send_in_pings:
- metrics
bugs:
- https://github.com/mozilla-mobile/fenix/issues/16075
data_reviews:
- https://github.com/mozilla-mobile/fenix/issues/16075
data_sensitivity:
- technical
notification_emails:
- fenix-core@mozilla.com
expires: never
top_sites_count:
type: counter
lifetime: application

@ -9,6 +9,7 @@ import mozilla.components.service.fxa.manager.SyncEnginesStorage
import mozilla.components.service.glean.Glean
import mozilla.components.service.glean.private.NoExtraKeys
import mozilla.components.support.base.log.logger.Logger
import org.mozilla.fenix.Config
import org.mozilla.fenix.GleanMetrics.AboutPage
import org.mozilla.fenix.GleanMetrics.Addons
import org.mozilla.fenix.GleanMetrics.AppTheme
@ -724,6 +725,14 @@ class GleanMetricsService(
mozillaProductDetector.getMozillaBrowserDefault(context)?.also {
defaultMozBrowser.set(it)
}
distributionId.set(
when (Config.channel.isMozillaOnline) {
true -> "MozillaOnline"
false -> "Mozilla"
}
)
mozillaProducts.set(mozillaProductDetector.getInstalledMozillaProducts(context))
adjustCampaign.set(context.settings().adjustCampaignId)

@ -269,6 +269,7 @@ The following metrics are added to the ping:
| metrics.close_tab_setting |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |A string that indicates the setting for tab closing: MANUAL, ONE_DAY, ONE_WEEK, ONE_MONTH |[1](https://github.com/mozilla-mobile/fenix/pull/15811#issuecomment-706402952)||2021-08-01 |2 |
| 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), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| 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), [3](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |1, 2 |
| metrics.distribution_id |[string](https://mozilla.github.io/glean/book/user/metrics/string.html) |A string containing the distribution identifier. This is currently used to identify installs from Mozilla Online. |[1](https://github.com/mozilla-mobile/fenix/issues/16075)||never |1 |
| metrics.has_open_tabs |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |A boolean that indicates if the user has any open NORMAL tabs. |[1](https://github.com/mozilla-mobile/fenix/pull/12024), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| metrics.has_recent_pwas |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |A boolean that indicates if the user has recently used PWAs. See recently_used_pwa_count for the actual count. |[1](https://github.com/mozilla-mobile/fenix/pull/11982#pullrequestreview-437963817), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |
| metrics.has_top_sites |[boolean](https://mozilla.github.io/glean/book/user/metrics/boolean.html) |A boolean that indicates if the user has top sites |[1](https://github.com/mozilla-mobile/fenix/pull/9556), [2](https://github.com/mozilla-mobile/fenix/pull/15713#issuecomment-703972068)||2021-08-01 |2 |

Loading…
Cancel
Save