Bug 1430145 - Add telemetry for script kind. r=baku, data-review=liuche

This commit is contained in:
Jon Coppeard 2018-01-17 03:06:00 -05:00
parent 9d9abc05ab
commit a38267f276
2 changed files with 16 additions and 0 deletions

View File

@ -195,6 +195,13 @@ CollectScriptTelemetry(nsIIncrementalStreamLoader* aLoader,
return;
}
// Report the script kind.
if (aRequest->IsModuleRequest()) {
AccumulateCategorical(LABELS_DOM_SCRIPT_KIND::ModuleScript);
} else {
AccumulateCategorical(LABELS_DOM_SCRIPT_KIND::ClassicScript);
}
// Report the type of source, as well as the size of the source.
if (aRequest->IsLoadingSource()) {
if (aRequest->mIsInline) {

View File

@ -12450,6 +12450,15 @@
"n_values": 12,
"description": "Plugin drawing model. 0 when windowed, otherwise NPDrawingModel + 1."
},
"DOM_SCRIPT_KIND": {
"record_in_processes": ["main", "content"],
"alert_emails": ["jcoppeard@mozilla.com"],
"expires_in_version": "63",
"kind": "categorical",
"bug_numbers": [1430145],
"labels": ["ClassicScript", "ModuleScript"],
"description": "Record the kind of every script loaded in a document."
},
"DOM_SCRIPT_SRC_ENCODING": {
"record_in_processes": ["main", "content"],
"alert_emails": ["dteller@mozilla.com"],