Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Latest commit

 

History

History
34 lines (22 loc) · 3.06 KB

README.md

File metadata and controls

34 lines (22 loc) · 3.06 KB

Glean Development Guide

The Glean metrics.yaml file is the brain - it defines all the metrics we want to track and is used to build the necessary files and functions that we need to send events & corresponding data. I recommend reading through the Metrics YAML Registry docs to get a good understanding of the different parts of the metrics.yaml file and what each piece of info is used for.

Updating the metrics.yaml file

Currently, in an effort to keep our metrics as consistent as possible across clients, we are referencing a shared metrics.yaml file. Kirill owns this file and it acts as the source of truth for what metrics we are tracking for Mozilla Social.

This shared metrics.yaml file is intended to be used by all the client teams - web, android & iOS. However, since there are some things in the metrics.yaml file that aren't applicable to web and other things that web needs that the other clients don't, there are some deviations to keep in mind. Keeping the metrics.yaml file up to date and with the correct client-specific info is a manual process currently. We need to figure out a better solution for this long-term but for the sake of getting everyone up to speed on where we are currently, I wanted to throw something together quickly.

When this file has been updated, Kirill will notify us and we need to make changes to update it. Here's my current process:

  1. Copy the raw JSON of Kirill's metrics.yaml gist
  2. Paste that raw JSON in the metrics.yaml file here in elk, replacing everything that was there before
  3. Check git diff to make sure I understand what is changing between the previous version and this one
  4. Remove the extra things in the shared metrics.yaml file that aren't specific to web
  5. Run the build:glean script
  6. Delete any old generated files (if needed)
    • If a category gets removed from the metrics.yaml file, glean does not automatically remove the old corresponding generated file, so we need to do that manually

Remove metrics not needed for web

  1. In the identifiers category:

    • remove adjust_device_id - mobile specific
  2. Remove baseline everywhere it exists

  3. Remove the backend category

    • the whole thing, including the object_updated metric

The Spreadsheet™️

The data team has requested that we keep this spreadsheet up to date as we add engagement events. It's very similar to what we were doing in Pocket - tracking the event name and all its corresponding additional metadata.