Test-telemetry-pings.md (4218B)
Test Telemetry Pings
You can view your test pings here. Note that there is also a button within the Glean Debug Tools to access this link. Use one of the methods below to send test pings.
Note: In order to test telemetry on debug builds with methods 1 and 2, the following patch must also be applied:
diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt
index c38ebb62d..3ae102d97 100644
--- a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt
+++ b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt
@@ -50,7 +50,7 @@ interface MetricController {
isMarketingDataTelemetryEnabled: () -> Boolean,
settings: Settings
): MetricController {
- return if (BuildConfig.TELEMETRY) {
+ return if (true) {
ReleaseMetricController(
services,
isDataTelemetryEnabled,
*Method 1 (about:glean)*
Since version 136, telemetry pings can be tested via about:glean.
- You can remove the Android SDK Platform tools by deleting the folders and zip file
*Method 2 (Debug Drawer)*
Since version 132, telemetry pings can be tested via the Glean Debug Tools feature.
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
*Method 3 (ADB with a computer)*
Prior to version 132, telemetry pings must be tested by plugging your Android device into a computer and following these instructions:
Watch a step by step video.
- You can remove the Android SDK Platform tools by deleting the folders and zip file
diff --git a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
index 4cb11de43..0c6fab136 100644
--- a/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
+++ b/app/src/main/java/org/mozilla/fenix/FenixApplication.kt
@@ -293,9 +293,7 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
}
private fun startMetricsIfEnabled() {
- if (settings().isTelemetryEnabled) {
- components.analytics.metrics.start(MetricServiceType.Data)
- }
+ components.analytics.metrics.start(MetricServiceType.Data)
if (settings().isMarketingTelemetryEnabled) {
components.analytics.metrics.start(MetricServiceType.Marketing)
diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt
index c38ebb62d..3ae102d97 100644
--- a/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt
+++ b/app/src/main/java/org/mozilla/fenix/components/metrics/MetricController.kt
@@ -50,7 +50,7 @@ interface MetricController {
isMarketingDataTelemetryEnabled: () -> Boolean,
settings: Settings
): MetricController {
- return if (BuildConfig.TELEMETRY) {
+ return if (true) {
ReleaseMetricController(
services,
isDataTelemetryEnabled,
- You can remove the Android SDK Platform tools by deleting the folders and zip file
- You can remove the Android SDK Platform tools by deleting the folders and zip file
adb shell am start -n org.mozilla.fenix.debug/mozilla.telemetry.glean.debug.GleanDebugActivity \
--ez logPings true \
--es sendPing metrics \
--es debugViewTag test-metrics-ping
- You can remove the Android SDK Platform tools by deleting the folders and zip file
The parameter sendPing can be metrics or events depending on your needs; additionally, debugViewTag can be customized to your preferred tag debugViewTag your-metrics-ping.