Pass auto-generated build info (version code and name) to Glean (#18230)

This also re-generated the Glean docs due to an update of the bundled
glean-parser.
upstream-sync
Jan-Erik Rediger 4 years ago committed by GitHub
parent cf483ef580
commit 8b7279ebe4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,6 +27,7 @@ import org.junit.BeforeClass
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.mozilla.fenix.GleanMetrics.GleanBuildInfo
import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.HomeActivityTestRule import org.mozilla.fenix.helpers.HomeActivityTestRule
@ -85,9 +86,10 @@ class BaselinePingTest {
// we need to do this on the main thread, as the Glean SDK requires it. // we need to do this on the main thread, as the Glean SDK requires it.
GlobalScope.launch(Dispatchers.Main.immediate) { GlobalScope.launch(Dispatchers.Main.immediate) {
Glean.initialize( Glean.initialize(
ApplicationProvider.getApplicationContext(), applicationContext = ApplicationProvider.getApplicationContext(),
true, uploadEnabled = true,
Configuration(httpClient = httpClient) configuration = Configuration(httpClient = httpClient),
buildInfo = GleanBuildInfo.buildInfo
) )
} }
} }

@ -39,6 +39,7 @@ import mozilla.components.support.rusthttp.RustHttpConfig
import mozilla.components.support.rustlog.RustLog import mozilla.components.support.rustlog.RustLog
import mozilla.components.support.utils.logElapsedTime import mozilla.components.support.utils.logElapsedTime
import mozilla.components.support.webextensions.WebExtensionSupport import mozilla.components.support.webextensions.WebExtensionSupport
import org.mozilla.fenix.GleanMetrics.GleanBuildInfo
import org.mozilla.fenix.GleanMetrics.PerfStartup import org.mozilla.fenix.GleanMetrics.PerfStartup
import org.mozilla.fenix.components.Components import org.mozilla.fenix.components.Components
import org.mozilla.fenix.components.metrics.MetricServiceType import org.mozilla.fenix.components.metrics.MetricServiceType
@ -111,7 +112,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
httpClient = ConceptFetchHttpUploader( httpClient = ConceptFetchHttpUploader(
lazy(LazyThreadSafetyMode.NONE) { components.core.client } lazy(LazyThreadSafetyMode.NONE) { components.core.client }
)), )),
uploadEnabled = telemetryEnabled uploadEnabled = telemetryEnabled,
buildInfo = GleanBuildInfo.buildInfo
) )
} }

Loading…
Cancel
Save