Add a local json dump for SERP telemetry
Categories
(Fenix :: Search, task)
Tracking
(firefox124 fixed)
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: skhan, Assigned: skhan)
References
Details
We want the SERP telemetry to be as accurate as possible because it used to help predict and compare revenue received from our partners.
Why a dump is needed?
- If the initial fetch from the remote server fails i.e the very first time, then we don't have any data.
- On subsequent fetches, if clients can't get remote settings updates for some reason (e.g. enterprise blocking access to the servers, or signatures not verifying for some reason) we'll still get the user updated to a recent version when they update the app through the dump.
The is also noted here : https://github.com/mozilla-mobile/firefox-android/pull/3104#issuecomment-1850674230
Where to find the local json dump?
Per our conversation on slack, we've decided to add the local dump that we get from the raw json of the remote server (https://firefox.settings.services.mozilla.com/v1/buckets/main/collections/search-telemetry-v2/records) with an additional timetsamp property from dump in mozilla-central(https://searchfox.org/mozilla-central/source/services/settings/dumps/main/search-telemetry-v2.json#549).
The flow to incorporate this goes as follows
1. On first call to get the collection, when there is no local cache, then it seeds the cache from the dump and returns that. While also doing a server check and if successful, updates the cache with this data.
2. On subsequent startups, if the cache is older than the dump, the cache is replaced with the dump, and at some point later do the server checks. If the cache is older than the server data, cache is updated with this data.
Comment 1•9 months ago
|
||
Authored by https://github.com/sarah541
https://github.com/mozilla-mobile/firefox-android/commit/32de715732ece9317376caf67d496ea0be0d9e09
[main] Bug 1870066 - Add local dump and additonal logic
Description
•