This directory contains implementation of internal analytics of Missive via UMA.
To see the analytics results, visit the UMA Dashboard. Select “Chrome OS” as the platform and the channel of your interest. Then, click on “Metrics/Formula +” and search for “Platform.Missive.”. All items shown are analytics of the Missive daemon recorded and uploaded by this directory.
To add a new analytics resource:
Create a new class ResourceCollectorMyResource
that inherits ResourceCollector
.
Implement the virtual method ResourceCollectorMyResource::Collect
according to the document of ResourceCollector::Collect
. Here, you likely need to use libmetrics. Check out their documentation for guidance.
Register it to the registry in the MissiveDaemon
constructor by calling
analytics_registry_.Add("MyResource", std::make_unique<ResourceCollectorMyResource>(base::Minutes(10)))
Feel free to replace base::Minutes(10)
above with any reasonable time interval.
See ResourceCollectorStorage
for an example.
Generally speaking, only MissiveDaemon
should contain code that depends on this directory. The reason is twofold:
This directory is not synced to components/
. It will become burdensome to sync the part of Missive that need to be synced to components/
if they depend on this directory.
It is generally good engineering practice to not spill analytics code into implementation details. Otherwise, a simple change in implementation details or a small refactoring may unnoticeably introduce inconsistency into analytics.
The three words are quite confusing in the context of Encrypted Reporting Pipeline (ERP). Metrics or telemetry in ERP typically refers to monitoring data on device that are collected to directly benefit the admins and usually made accessible to them. Metrics or telemetry in Chrome, as referred to by UMA, are monitoring data on device that are collected to directly benefit developers, usually for better understanding the behavior of the software in production. To distinguish from metrics or telemetry in ERP, we refer to the term corresponding to metrics and telemetry in Chrome as analytics.
A quick summary: