Closed Bug 1483817 Opened Last year Closed Last year

Font Inspector telemetry needs more granular OS versioning

Categories

(DevTools :: Inspector, enhancement, P2)

57 Branch
enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
Firefox 63
Tracking Status
firefox63 --- fixed

People

(Reporter: miker, Assigned: miker)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Variable fonts have only been supported on Windows 10 since a particular version. This skews the Windows 10 telemetry so we need to include more version info in the font inspector telemetry events.
I have found a way to get this info but need to be able to build on Windows in order to check that it works correctly.

When I have a working Windows 10 build platform I will add an osinfo property to telemetry.js so that the information can be easily obtained in the future.
I am trying to get a working build onto my Windows laptop to test whether my method of getting the version number works on Windows.
Of course I need to get builds on my windows laptop working but for the moment I have pushed a patch to try to see what the version info looks like for each OS.
So the data I get back is:

Linux
{
  name: "Linux",
  version: "4.4.0-1014-aws",
  locale: "en-US"
}

OSX
{
  name: "Darwin",
  version: "14.5.0",
  locale: "en"
}

Windows 7
{
  name: "Windows_NT",
  version: "6.1",
  locale: "en-US",
  servicePackMajor: 1,
  servicePackMinor: 0,
  windowsBuildNumber: 7601,
  installYear: 2015
}

Windows 10
{
  name: "Windows_NT",
  version: "10.0",
  locale: "en-US",
  servicePackMajor: 0,
  servicePackMinor: 0,
  windowsBuildNumber: 15063,
  windowsUBR: 0,
  installYear: 2017
}

Which means that we can use the following method:

```js
get osNameAndVersion() {
  const osInfo = TelemetryEnvironment.currentEnvironment.system.os;

  if (!osInfo) {
    return "Unknown OS";
  }

  let osVersion = `${osInfo.name} ${osInfo.version}`;

  if (osInfo.windowsBuildNumber) {
    osVersion += `.${osInfo.windowsBuildNumber}`;
  }

  return osVersion;
}
```

This will return the following for the examples above:

Linux 4.4.0-1014-aws
Darwin 14.5.0
Windows_NT 6.1.7601
Windows_NT 10.0.15063
The font inspector currently has no event telemetry so I will need to set up the following as a general timer specific to OS name and build number:

```
  tool_timer:
    objects: ["animationinspector", "computedview", "fontinspector", "layoutview", "ruleview"]
    bug_numbers: [1483817]
    notification_emails: ["dev-developer-tools@lists.mozilla.org", "hkirschner@mozilla.com"]
    record_in_processes: ["main"]
    description: The amount of time a tool was opened for.
    release_channel_collection: opt-out
    expiry_version: never
    extra_keys:
      time_open: Time open.
      os: The OS name and version e.g. "Linux 4.4.0-1014-aws", "Darwin 14.5.0", "Windows_NT 6.1.7601" or "Windows_NT 10.0.15063." This can be used to make sense of data when a feature is only available from a particular operating system build number.
      session_id: The start time of the session in milliseconds since epoch (Unix Timestamp) e.g. 1396381378123.
```
Attached file data-review.txt
Attachment #9003152 - Flags: review?(francois)
- Added test to `devtools/client/inspector/test/browser_inspector_sidebarstate.js`.
- Added the OS and build number to the devtools.main::sidepanel_changed event.
- Created a osNameAndVersion getter inside telemetry.js because this can be useful whenever an OS supports new features.
- Log the devtools.main::tool_timer event from telemetry.toolOpened and telemetry.toolClosed for the animation inspector, computed view, font inspector, layout view and rule view.
- Updated the telemetry.md document because there is little point in breaking that change out to another bug.
- Added the devtools.main::tool_timer event to Events.yaml.
Comment on attachment 9003152 [details]
data-review.txt

1) Is there or will there be **documentation** that describes the schema for the ultimate data set available publicly, complete and accurate?

Yes, in Events.yaml.

2) Is there a control mechanism that allows the user to turn the data collection on and off?

Yes, telemetry setting.

3) If the request is for permanent data collection, is there someone who will monitor the data over time?**

Yes, Harald Kirschner.

4) Using the **[category system of data types](https://wiki.mozilla.org/Firefox/Data_Collection)** on the Mozilla wiki, what collection type of data do the requested measurements fall under?  **

Category 2.

5) Is the data collection request for default-on or default-off?

Default ON, all channels.

6) Does the instrumentation include the addition of **any *new* identifiers** (whether anonymous or otherwise; e.g., username, random IDs, etc.  See the appendix for more details)?

No.

7) Is the data collection covered by the existing Firefox privacy notice?

Yes.

8) Does there need to be a check-in in the future to determine whether to renew the data?

No, permanent.
Attachment #9003152 - Flags: review?(francois) → review+
Test using custom panel.
Turns out I already fixed the issue with a custom panel in a previous bug.

Should run this through try again to ensure that fixing merge conflicts hasn't broken anything.
Comment on attachment 9003154 [details]
Bug 1483817 - Font Inspector telemetry needs more granular OS versioning

Gabriel [:gl] (ΦωΦ) has approved the revision.
Attachment #9003154 - Flags: review+
Attachment #9003154 - Flags: review?(gl)
Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/623fd496e6ea
Font Inspector telemetry needs more granular OS versioning r=gl
https://hg.mozilla.org/mozilla-central/rev/623fd496e6ea
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
You need to log in before you can comment on or make changes to this bug.