Implementing-Telemetry.md (4135B)
Implementing Telemetry
Things to note before implementation:
- Understand that telemetry is important, it is not just a checkmark for feature completion.
- The consumer of the telemetry is the data science team.
- When in doubt, please follow the example implementation, documentation and data review format linked below.
- Avoid using SharedPreferences.
- Write unit tests.
Procedure to follow before implementing the telemetry:
- Write unit tests.
- Write unit tests.
- The categories that the Data Science team expects data from?
- What are the telemetries the Data Science team expects in each category?
- What type of data for each telemetry?
- What type of data for each telemetry?
- Inform the Data Science team which telemetry is not achievable. (if exists)
- Inform the Data Science team other possible telemetry that they might not know about.
- Inform the Data Science team what might not make sense to collection. (Ex: B always happens when A happens)
- Help the Data Science team collect the best telemetry data possible.
- Help the Data Science team collect the best telemetry data possible.
Procedure to follow when implementing a Glean telemetry event
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
- A full example of adding an event with keys can be found here (Android Components), here (Fenix) and here (Glean Annotation)
Review
See example here
- Add a developer that understands telemetry to review your change.
- Add a developer from the Glean team as reviewer if needed.
- Data review format here. (example here)
After Merge
- Data review format here. (example here)
- for events, go to Glean dictionary and find the event you want to verify. Click on the Looker link on the bottom of the page to confirm that the event is being reported. (For example, for creditcards.modified, the Glean dictionary link is [https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/creditcardsmodified](https://dictionary.telemetry.mozilla.org/apps/fenix/metrics/creditcardsmodified). On the bottom click on the "creditcards.modified" link next to Looker to see event count)
- for metrics, create a query (ex: https://sql.telemetry.mozilla.org/queries/82373) to confirm that metric is being reported.
- for metrics, create a query (ex: https://sql.telemetry.mozilla.org/queries/82373) to confirm that metric is being reported.
Renewing Expiring Telemetry
See steps here