Closed Bug 1870066 Opened 10 months ago Closed 9 months ago

Add a local json dump for SERP telemetry

Categories

(Fenix :: Search, task)

All
Android
task

Tracking

(firefox124 fixed)

RESOLVED FIXED
124 Branch
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?

  1. If the initial fetch from the remote server fails i.e the very first time, then we don't have any data.
  2. 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.
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch
You need to log in before you can comment on or make changes to this bug.