Skip to content

Commit

Permalink
Pass auto-generated build info (version code and name) to Glean (mozi…
Browse files Browse the repository at this point in the history
…lla-mobile#18230)

This also re-generated the Glean docs due to an update of the bundled
glean-parser.
  • Loading branch information
badboy authored and pkirakosyan committed Aug 5, 2021
1 parent 9305a41 commit 7603a88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import org.junit.BeforeClass
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.mozilla.fenix.GleanMetrics.GleanBuildInfo
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
import org.mozilla.fenix.helpers.HomeActivityTestRule
Expand Down Expand Up @@ -85,9 +86,10 @@ class BaselinePingTest {
// we need to do this on the main thread, as the Glean SDK requires it.
GlobalScope.launch(Dispatchers.Main.immediate) {
Glean.initialize(
ApplicationProvider.getApplicationContext(),
true,
Configuration(httpClient = httpClient)
applicationContext = ApplicationProvider.getApplicationContext(),
uploadEnabled = true,
configuration = Configuration(httpClient = httpClient),
buildInfo = GleanBuildInfo.buildInfo
)
}
}
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/org/mozilla/fenix/FenixApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import mozilla.components.support.rusthttp.RustHttpConfig
import mozilla.components.support.rustlog.RustLog
import mozilla.components.support.utils.logElapsedTime
import mozilla.components.support.webextensions.WebExtensionSupport
import org.mozilla.fenix.GleanMetrics.GleanBuildInfo
import org.mozilla.fenix.GleanMetrics.PerfStartup
import org.mozilla.fenix.components.Components
import org.mozilla.fenix.components.metrics.MetricServiceType
Expand Down Expand Up @@ -112,7 +113,8 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
httpClient = ConceptFetchHttpUploader(
lazy(LazyThreadSafetyMode.NONE) { components.core.client }
)),
uploadEnabled = telemetryEnabled
uploadEnabled = telemetryEnabled,
buildInfo = GleanBuildInfo.buildInfo
)
}
Gexsi end */
Expand Down

0 comments on commit 7603a88

Please sign in to comment.