Bug 1248435 - Add telemetry probes for reload addon installation and reload action. r=jryans data-review=bsmedberg

This commit is contained in:
Alexandre Poirot 2016-03-02 02:32:05 -08:00
Родитель f4f1157370
Коммит 82c73c6b27
3 изменённых файлов: 49 добавлений и 2 удалений

13
devtools/bootstrap.js поставляемый
Просмотреть файл

@ -8,6 +8,13 @@ const Cu = Components.utils;
const Ci = Components.interfaces;
const {Services} = Cu.import("resource://gre/modules/Services.jsm", {});
function actionOccurred(id) {
let {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
let Telemetry = require("devtools/client/shared/telemetry");;
let telemetry = new Telemetry();
telemetry.actionOccurred(id);
}
// Helper to listen to a key on all windows
function MultiWindowKeyListener({ keyCode, ctrlKey, altKey, callback }) {
let keyListener = function (event) {
@ -150,6 +157,8 @@ function reload(event) {
gDevTools.showToolbox(target);
}, 1000);
}
actionOccurred("reloadAddonReload");
}
let listener;
@ -165,5 +174,7 @@ function shutdown() {
listener.stop();
listener = null;
}
function install() {}
function install() {
actionOccurred("reloadAddonInstalled");
}
function uninstall() {}

Просмотреть файл

@ -233,7 +233,15 @@ Telemetry.prototype = {
histogram: "DEVTOOLS_CUSTOM_OPENED_COUNT",
userHistogram: "DEVTOOLS_CUSTOM_OPENED_PER_USER_FLAG",
timerHistogram: "DEVTOOLS_CUSTOM_TIME_ACTIVE_SECONDS"
}
},
reloadAddonInstalled: {
histogram: "DEVTOOLS_RELOAD_ADDON_INSTALLED_COUNT",
userHistogram: "DEVTOOLS_RELOAD_ADDON_INSTALLED_PER_USER_FLAG",
},
reloadAddonReload: {
histogram: "DEVTOOLS_RELOAD_ADDON_RELOAD_COUNT",
userHistogram: "DEVTOOLS_RELOAD_ADDON_RELOAD_PER_USER_FLAG",
},
},
/**

Просмотреть файл

@ -7021,6 +7021,20 @@
"description": "Number of times a custom developer tool has been opened.",
"releaseChannelCollection": "opt-out"
},
"DEVTOOLS_RELOAD_ADDON_INSTALLED_COUNT": {
"alert_emails": ["dev-developer-tools@lists.mozilla.org"],
"expires_in_version": "55",
"kind": "count",
"description": "Number of times the reload addon has been installed.",
"bug_numbers": [1248435]
},
"DEVTOOLS_RELOAD_ADDON_RELOAD_COUNT": {
"alert_emails": ["dev-developer-tools@lists.mozilla.org"],
"expires_in_version": "55",
"kind": "count",
"description": "Number of times the tools have been reloaded by the reload addon.",
"bug_numbers": [1248435]
},
"DEVTOOLS_TOOLBOX_OPENED_PER_USER_FLAG": {
"expires_in_version": "never",
"kind": "flag",
@ -7204,6 +7218,20 @@
"kind": "flag",
"description": "Number of users that have opened a custom developer tool via the toolbox button."
},
"DEVTOOLS_RELOAD_ADDON_INSTALLED_PER_USER_FLAG": {
"alert_emails": ["dev-developer-tools@lists.mozilla.org"],
"expires_in_version": "55",
"kind": "flag",
"description": "Records once per browser version if the reload add-on is installed.",
"bug_numbers": [1248435]
},
"DEVTOOLS_RELOAD_ADDON_RELOAD_PER_USER_FLAG": {
"alert_emails": ["dev-developer-tools@lists.mozilla.org"],
"expires_in_version": "55",
"kind": "flag",
"description": "Records once per browser version if the tools have been reloaded via the reload add-on.",
"bug_numbers": [1248435]
},
"DEVTOOLS_TOOLBOX_TIME_ACTIVE_SECONDS": {
"expires_in_version": "never",
"kind": "exponential",