Telemetry documents aggregation

I’m trying to understand a few things:

  • when are user telemetry documents synced from a phone to the user-specifc meta database in couch?
  • I’m I able to tell why a telemetry doc in the user-specific meta database is not ending up in the aggregate users-meta database. Do we record when the telemetry document is synced up? similar to what we do with info docs for reports and contacts?
  • The meta db is synced every 30 minutes from phone to server.
  • The CHT does not record info docs for meta docs.
  • Sentinel syncs to the aggregate users-meta db at 2am every day so check the sentinel logs to make sure it’s running and there are no errors.

Thanks @gareth!

Thanks for initiating this thread @derick .

I have a specific use case of a user who synced on 25th April at 5:12 PM EAT. If sentinel syncs every day at 2 am UTC (5 AM EAT), then the telemetry should have been available on 26th. However, the telemetry doc in users-meta was not visible until April 28th (i.e 3 days).

Below is the screenshot of their app:

Our goal is to view the latest meta as soon as possible. Hence, a 3 day delay period is quite long. As such, should we ask our users to remain online for at least an hour after syncing so that the telemetry gets synced as well?

Hi @iesmail

I think that as of 3.13 initiating a “forced” sync (clicking sync now from the hamburger menu button) also syncs meta db, circumventing the 30 minute timeout.

However, the UI doesn’t get updated when the meta sync is successful or completed, so even after clicking Sync now, it’s safe to be online for some time to make sure meta sync completes.

As for your calculation:

  • telemetry gets aggregated the next day, so the telemetry document for Apr 25 gets aggregated and is uploaded sometime in Apr 26
  • It gets aggregated into users-meta on the Apr 27

A 2 day interval is the least you would expect to get telemetry. I don’t have an explanation for the extra day.

1 Like

Thanks @diana for the detailed explanation. As a next step, I want to communicate with the users to stay online for sometime after syncing. Does half n hour suffice?

It’s impossible to say for sure. We have a telemetry entry for the duration of meta database replication: replication:meta:sync:success. You can check entries to have an idea of how long it takes, at most or on average.