Open Bug 1330856 Opened 7 years ago Updated 2 years ago

List environment user prefs in a separate YAML file

Categories

(Toolkit :: Telemetry, defect, P3)

defect

Tracking

()

Tracking Status
firefox53 --- affected

People

(Reporter: gfritzsche, Unassigned)

References

Details

(Whiteboard: [measurement:client])

Following up to bug 1274008, comment 6 ff, we want the environment user prefs to be listed in a separate file.

Currently they live here:
https://dxr.mozilla.org/mozilla-central/rev/048240a074e841c425a4da4707cf8e353074ec1d/toolkit/components/telemetry/TelemetryEnvironment.jsm#121

We should list them with:
- name
- pref type (bool, string, number)
- collection type (collect pref value or only non-default state)
- description for documentation purposes
Suggested file: toolkit/components/telemetry/EnvironmentPrefs.yaml

We should try to use parse_scalars.py for this, slightly augmenting it if needed.
A separate Python script would then use parse_scalars.py to generate the data, similar to gen-scalar-data.py:
https://dxr.mozilla.org/mozilla-central/search?q=gen-scalar-data.py

This would generate JS data in a separate file, of the form [{pref name, collection, type}, ...] or so.
We could either import or include this in TelemetryEnvironment.jsm, which will continue to contain the collection code:
https://dxr.mozilla.org/mozilla-central/search?q=_watchedPrefs+path%3ATelemetryEnvironment.jsm&redirect=false
Whiteboard: [measurement:client]
Mentor: alessio.placitelli, gfritzsche
We should also add testing prefs to the YAML file, which should:
- get coverage in unit tests
- not be added to pings outside of tests
Note that this bug is not a good starter bug.
It is a bit more involved and needs some design work.
Mentor: alessio.placitelli, gfritzsche
See Also: → 1387119

A couple additional needs I had written down in bug 1567948:

  • document a responsible individual
  • permit probe expiry
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.