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.
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:
- Copy the raw JSON of Kirill's
metrics.yaml
gist - Paste that raw JSON in the
metrics.yaml
file here in elk, replacing everything that was there before - Check git diff to make sure I understand what is changing between the previous version and this one
- Remove the extra things in the shared
metrics.yaml
file that aren't specific to web - Run the
build:glean
script - 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
- If a category gets removed from the
-
In the
identifiers
category:- remove
adjust_device_id
- mobile specific
- remove
-
Remove
baseline
everywhere it exists -
Remove the
backend
category- the whole thing, including the
object_updated
metric
- the whole thing, including the
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.