diff --git a/mobile/android/android-components/components/service/glean/src/main/java/mozilla/components/service/glean/config/Configuration.kt b/mobile/android/android-components/components/service/glean/src/main/java/mozilla/components/service/glean/config/Configuration.kt index 11911c704673d..382078d3c910a 100644 --- a/mobile/android/android-components/components/service/glean/src/main/java/mozilla/components/service/glean/config/Configuration.kt +++ b/mobile/android/android-components/components/service/glean/src/main/java/mozilla/components/service/glean/config/Configuration.kt @@ -19,6 +19,8 @@ import mozilla.telemetry.glean.config.Configuration as GleanCoreConfiguration * @property channel (optional )the release channel the application is on, if known. This will be * sent along with all the pings, in the `client_info` section. * @property maxEvents (optional) the number of events to store before the events ping is sent + * @property enableEventTimestamps (Experimental) Whether to add a wallclock timestamp to all events. + * @property delayPingLifetimeIo Whether Glean should delay persistence of data from metrics with ping lifetime. */ data class Configuration @JvmOverloads constructor( val httpClient: PingUploader, @@ -26,6 +28,7 @@ data class Configuration @JvmOverloads constructor( val channel: String? = null, val maxEvents: Int? = null, val enableEventTimestamps: Boolean = false, + val delayPingLifetimeIo: Boolean = false, ) { // The following is required to support calling our API from Java. companion object { @@ -45,6 +48,7 @@ data class Configuration @JvmOverloads constructor( maxEvents = maxEvents, httpClient = httpClient, enableEventTimestamps = enableEventTimestamps, + delayPingLifetimeIo = delayPingLifetimeIo, ) } } diff --git a/mobile/android/fenix/app/nimbus.fml.yaml b/mobile/android/fenix/app/nimbus.fml.yaml index f2d80ced961f1..e0f76f88837a4 100644 --- a/mobile/android/fenix/app/nimbus.fml.yaml +++ b/mobile/android/fenix/app/nimbus.fml.yaml @@ -248,6 +248,7 @@ features: glean: description: "A feature that provides server-side configurations for Glean metrics (aka Server Knobs)." + allow-coenrollment: true variables: metrics-enabled: description: "A map of metric base-identifiers to booleans representing the state of the 'enabled' flag for that metric." @@ -257,6 +258,10 @@ features: description: "Enables precise event timestamps for Glean events" type: Boolean default: false + delay-ping-lifetime-io: + description: "Glean will delay io for ping lifetime metrics" + type: Boolean + default: true splash-screen: description: "A feature that extends splash screen duration, allowing additional data fetching time for the app's initial run." diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt index 07560873a9478..cd367fa467885 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/FenixApplication.kt @@ -206,6 +206,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider { lazy(LazyThreadSafetyMode.NONE) { components.core.client }, ), enableEventTimestamps = FxNimbus.features.glean.value().enableEventTimestamps, + delayPingLifetimeIo = FxNimbus.features.glean.value().delayPingLifetimeIo, ) // Set the metric configuration from Nimbus.