Bug 1545410 - part 2: Add telemetry probe to decide when we can remove the hack for Office Online Server data-review=liuche, r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D32288

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Masayuki Nakano 2019-06-03 14:05:18 +00:00
parent dcb38ecb71
commit af9134a0d3
2 changed files with 22 additions and 0 deletions

View File

@ -39,12 +39,17 @@ class KeyPressEventModelCheckerChild extends ActorChild {
_isOldOfficeOnlineServer(aDocument) {
let editingElement =
aDocument.getElementById("WACViewPanel_EditingElement");
// If it's not Office Online Server, don't include it into the telemetry
// because we just need to collect percentage of old version in all loaded
// Office Online Server instances.
if (!editingElement) {
return false;
}
let isOldVersion =
!editingElement.classList.contains(
"WACViewPanel_DisableLegacyKeyCodeAndCharCode");
Services.telemetry.keyedScalarAdd("dom.event.office_online_load_count",
isOldVersion ? "old" : "new", 1);
return isOldVersion;
}

View File

@ -1981,6 +1981,23 @@ dom.event:
record_in_processes:
- 'content'
office_online_load_count:
bug_numbers:
- 1545410
description: >
Number of times Office Online Server instances are loaded, and whether
they are compatible with conflated keypress event model or not, using
"new"/"old". I.e., collecting percentage of too old Confluence instance
use count in all Office Online Server instance use count.
expires: "71"
keyed: true
kind: uint
notification_emails:
- mnakano@mozilla.com
release_channel_collection: opt-out
record_in_processes:
- 'content'
navigator.storage:
estimate_count:
bug_numbers: