Telemetry for Settings
Similar to settings events in Focus: https://github.com/mozilla-mobile/focus-android/blob/master/docs/Telemetry.md#settings
What questions will you answer with this data?
- These probes will help us understand what default settings our users mostly change, e.g. search engine provider, or other settings that are set by default to either on/off.
Probes
- see here: https://github.com/mozilla-mobile/focus-android/blob/master/docs/Telemetry.md#settings
- all toggles/settings under settings should be tracked so we understand usage and customization appetite of our users.
Dependencies (Added by PM and Eng)
- Glean SDK (Event ping)
Acceptance Criteria (Added by PM)
- Event pings can be queried via re:dash
- We are sending telemetry events for the actions listed in the requirements
- We have documented the telemetry
- We have asked a data steward to review the telemetry
- NOT an AC: Data science to create dashboard or further graphs (this will be a separate issue, this issue is only about hooking up the events described and that they can be queried in re-dash)
┆Issue is synchronized with this Jira Task
@bbinto to confirm: is this covering the event ping of toggling something on or off, or the core ping of what a use has set when they launch the app?
I think we had both for Focus, but want to ensure that both are tracked for Fenix and clarify which one this ticket addresses (the focus telemetry you linked to is a core ping but this says event pings).
Good question @sblatz - this should mostly cover the toggle events, however the saved state for some will go into the baseline ping, e.g. change search provider (https://github.com/mozilla-mobile/fenix/issues/1300) So the event probe will record "when the switch/setting" was changed and the what, e.g. DDG as the default search engine will be stored in the baseline (https://github.com/mozilla-mobile/fenix/issues/1300)
I hope that makes sense.
@bbinto, @vesta0 do we also want a ticket for the core ping of these settings? We don't have a ticket to track that right now.
@sblatz - The ones that should be in the baseline ping have been filed already (see GH issues listed for everything below row 23).
Hello, note that I tried many times to trigger the event pings for Settings but I couldn't find them in the logs. As Barbara said above few of the pings will go to baseline and the ones that are in this bug list I was able to identify them:
- make_default_browser -
"metrics.default_moz_browser": "" - telemetry -
"telemetry_sdk_build": "0.56.0"
But I'm not sure if those are the exact pings mentioned in the table below.
Tested with the latest build from 6/5 with Samsung Galaxy Note 9(Android 8.1.0).
The information collected after reading the comments above and from other bugs
- We want to have the event pings just like on focus.
- The available preference_key: description: "The preference key for the switch preference the user toggled. We currently track:
| Setting | Key | Value(*) |
|---|---|---|
| leakcanary | ||
| make_default_browser | ||
| show_search_suggestions | ||
| show_visited_sites_bookmarks | ||
| remote_debugging | ||
| telemetry | ||
| tracking_protection |
I tried to recreate the table from focus to have a better understanding of keys.
- From the Focus documentation
In addition to the core ping an event ping for UI telemetry is generated and sent as soon as the app is sent to the background.-- will this the way pings will be triggered in Fenix? - The preference_key names from metrics document are the exact one that are gonna be displayed in metrics / logs? I'm asking this because I was able to find the
"metrics.default_moz_browser": "",but it is with a different name and there are no specifications regarding this.
For more details please see the logcat.txt Based on my comment I will remove the QA-Needed label.
Hi, I've check on the latest Fenix version (2019-06-06T06:12:22.271Z) using a Google Pixel 3XL and the issues still occur.
Please find attached and review this logcat DefaultB_TrackP_RemoteDebug.txt.
I've only check the following 3 toggle events:
• "Show search suggestions"
• "Tracking protection"
• "Remote debugging via USB"
In the attached log, I found that is starts to collect the events "Collecting events" (Line 389) but afterwards "No content for ping 'PingType(name=events, includeClientId=true).name', therefore no ping queued"(Line 390).
Another worth mentioning fact would be in regards with the "Settings" button I used the following scenario: -Open app by tapping on the icon -Tap the search bar -Tap the Settings button -Tap Library button
If you check this log Settings+YourLibrary.txt you'll see the following:
• Lines 244-280 Processing and submitting the "app_opened" events ping • Lines 512-571 Processing and submitting the "search_bar_tapped" events ping • Lines 590-592 Selection of the Settings button having this description in the log "No content for ping 'PingType(name=events, includeClientId=true).name', therefore no ping queued." • Lines 992- 1086 Processing and submitting the "library" events ping
Can't this be caused in the first place by the "Settings" button? and because of this, the other buttons are also affected?
Looks like this was likely an issue fixed by #3224 :)
Hi, still no luck regarding sending of the switch preference from settings, nor the settings button.
Broke down this run in 2 sections as it follows:
1.Testing of the buttons from the 3 dot menu
1.1 The application goes into the background:
•Steps: Opened the app Tapped Settings button Tapped Library button Tapped Help button
As per the attached logcat lines 698 - 742 contain the events processed and sent.1st.txt The ping from the dashboard :https://debug-ping-preview.firebaseapp.com/pings/2311bde3-47fc-4272-9a8b-b1cce4e7eaf5/aj-teset-02 The tap of the Settings button is not included.
1.2 By forcing the pings:
I've used the same steps as above As per the attached logcat 2nd.txt the only events sent are: lines 259 - 294 App_opened lines 398 - 431 Library - opened lines 596 - 629 Library - closed
By checking the dashboard it seems that event ping for the Settings button wasn't sent (aj-Forceteset-01 missing):
aj-Forceteset-00 App_opened https://debug-ping-preview.firebaseapp.com/pings/2311bde3-47fc-4272-9a8b-b1cce4e7eaf5/aj-Forceteset-00 aj-Forceteset-02 Library - opened https://debug-ping-preview.firebaseapp.com/pings/2311bde3-47fc-4272-9a8b-b1cce4e7eaf5/aj-Forceteset-02 aj-Forceteset-03 Library - closed https://debug-ping-preview.firebaseapp.com/pings/2311bde3-47fc-4272-9a8b-b1cce4e7eaf5/aj-Forceteset-03
2.Testing the switch preference from settings
2.1 The application goes into the background:
•Steps: Show search suggestions -Disabled Show visited sites and bookmarks - Disabled Tracking protection - Disabled Data choices - Telemetry - Disabled Remote debugging via USB - Enabled
Beside the Metrics ping, 2 Baseline pings and the Events ping (app_opened) no other ping was sent afterwards.
As per the attached logcat 3rd.txt Line 968 - Could be the outcome of disabling the Telemetry "Glean must be enabled before sending pings." The ping from the dashboard : https://debug-ping-preview.firebaseapp.com/pings/2311bde3-47fc-4272-9a8b-b1cce4e7eaf5/aj-teset-07
2.2 By forcing the pings:
I've used the same steps as above (2.1) As per the attached logcat 4th.txt, only one event was sent (app_opened) and there are a lot of cases of: "Collecting events No content for ping 'PingType(name=events, includeClientId=true).name', therefore no ping queued." Line 495 - Could be the outcome of disabling the Telemetry "Glean must be enabled before sending pings." The ping from the dashboard: https://debug-ping-preview.firebaseapp.com/pings/2311bde3-47fc-4272-9a8b-b1cce4e7eaf5/aj-Forceteset-07
Please note that disabling the Data choices - Telemetry will lead to "Glean must be enabled before sending pings." is this the proper way to record the disable of this setting ?
Based on this comment I'll remove the QA needed.
Okay, I think we've finally tracked down the root issue. Somehow I missed adding the events to GleanMetricsService.kt
Hello @sblatz, I believe it's happening I was able to see:
pref_key_show_search_suggestionspref_key_show_visited_sites_bookmarkspref_key_remote_debuggingpref_key_telemetrypref_key_tracking_protection
- But
make_default_browserit's displayed in metrics and not events, I believe this is fine, if you can confirm. - There is only one preference remaining
pre_key_leakcanaryand I can see that it is in thepreferencesjust belowdelete browsing dataanddata choicesI wanted to ask, is there a possibility to testleakcanaryor can you help out with this? I believe the source code should be modified in order to create a leak memory. Atm I know of no scenario to trigger a leak so for the purpose of this test I think we need someone to introduce such a memory leak in code.
Here you can find the event sent to Glean Debug ping viewer dashboard including the pref keys mentioned above, log_settings.txt.
Please note that after we clarify the last two questions from above, I will can verify this issue as fixed.
Thanks, Andrei
@abodea I've actually gone ahead and removed the telemetry for both make_default_browser and leakcanary
Default browser cannot work because of our custom toggling code. Leakcanary only exists in debug builds and thus does not need telemetry.
Verified as fixed with the latest build from 6/12 with Samsung Galaxy Note 9(Android 8.1.0).
Note that based on this comment all the remaining pref keys are working as expected.