зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1722774 - Adds telemetry to know which of the region selection methods are used. r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D122273
This commit is contained in:
Родитель
d479928bd4
Коммит
3026a19d36
|
@ -160,7 +160,15 @@ this.analytics = (function() {
|
|||
};
|
||||
|
||||
exports.incrementCount = function(scalar) {
|
||||
const allowedScalars = ["download", "upload", "copy"];
|
||||
const allowedScalars = [
|
||||
"download",
|
||||
"upload",
|
||||
"copy",
|
||||
"visible",
|
||||
"full_page",
|
||||
"custom",
|
||||
"element",
|
||||
];
|
||||
if (!allowedScalars.includes(scalar)) {
|
||||
const err = `incrementCount passed an unrecognized scalar ${scalar}`;
|
||||
log.warn(err);
|
||||
|
|
|
@ -161,6 +161,10 @@ this.main = (function() {
|
|||
return null;
|
||||
});
|
||||
|
||||
communication.register("captureTelemetry", (sender, ...args) => {
|
||||
catcher.watchPromise(incrementCount(...args));
|
||||
});
|
||||
|
||||
communication.register("openShot", async (sender, { url, copied }) => {
|
||||
if (copied) {
|
||||
const id = makeUuid();
|
||||
|
|
|
@ -181,6 +181,7 @@ this.uicontrol = (function() {
|
|||
exports.deactivate();
|
||||
},
|
||||
onClickVisible: () => {
|
||||
callBackground("captureTelemetry", "visible");
|
||||
sendEvent("capture-visible", "selection-button");
|
||||
selectedPos = new Selection(
|
||||
window.scrollX,
|
||||
|
@ -192,6 +193,7 @@ this.uicontrol = (function() {
|
|||
setState("previewing");
|
||||
},
|
||||
onClickFullPage: () => {
|
||||
callBackground("captureTelemetry", "full_page");
|
||||
sendEvent("capture-full-page", "selection-button");
|
||||
captureType = "fullPage";
|
||||
const width = getDocumentWidth();
|
||||
|
@ -564,6 +566,7 @@ this.uicontrol = (function() {
|
|||
);
|
||||
setState("selected");
|
||||
sendEvent("autoselect");
|
||||
callBackground("captureTelemetry", "element");
|
||||
} else {
|
||||
sendEvent("no-selection", "no-element-found");
|
||||
setState("crosshairs");
|
||||
|
@ -648,6 +651,7 @@ this.uicontrol = (function() {
|
|||
})
|
||||
);
|
||||
setState("selected");
|
||||
callBackground("captureTelemetry", "custom");
|
||||
},
|
||||
|
||||
end() {
|
||||
|
@ -739,6 +743,7 @@ this.uicontrol = (function() {
|
|||
sendEvent("keep-move-selection", "mouseup");
|
||||
}
|
||||
setState("selected");
|
||||
callBackground("captureTelemetry", "custom");
|
||||
},
|
||||
|
||||
_resize(event) {
|
||||
|
|
|
@ -3927,6 +3927,74 @@ screenshots:
|
|||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
visible:
|
||||
bug_numbers:
|
||||
- 1722774
|
||||
description: >
|
||||
The count of new screenshots created using just the viewport,
|
||||
no scrolling.
|
||||
expires: never
|
||||
kind: uint
|
||||
notification_emails:
|
||||
- screenshots-dev@mozilla.org
|
||||
release_channel_collection: opt-out
|
||||
products:
|
||||
- 'firefox'
|
||||
- 'fennec'
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
full_page:
|
||||
bug_numbers:
|
||||
- 1722774
|
||||
description: >
|
||||
The count of new screenshots created by capturing the full,
|
||||
scrolled page.
|
||||
expires: never
|
||||
kind: uint
|
||||
notification_emails:
|
||||
- screenshots-dev@mozilla.org
|
||||
release_channel_collection: opt-out
|
||||
products:
|
||||
- 'firefox'
|
||||
- 'fennec'
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
custom:
|
||||
bug_numbers:
|
||||
- 1722774
|
||||
description: >
|
||||
The count of new screenshots created using the drag handles
|
||||
to draw the box size and position.
|
||||
expires: never
|
||||
kind: uint
|
||||
notification_emails:
|
||||
- screenshots-dev@mozilla.org
|
||||
release_channel_collection: opt-out
|
||||
products:
|
||||
- 'firefox'
|
||||
- 'fennec'
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
element:
|
||||
bug_numbers:
|
||||
- 1722774
|
||||
description: >
|
||||
The count of new screenshots created using the highlighter
|
||||
to select element bounds.
|
||||
expires: never
|
||||
kind: uint
|
||||
notification_emails:
|
||||
- screenshots-dev@mozilla.org
|
||||
release_channel_collection: opt-out
|
||||
products:
|
||||
- 'firefox'
|
||||
- 'fennec'
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
# The following section is for tracking the number of failure for indexedDB.
|
||||
idb.failure:
|
||||
fileinfo_error:
|
||||
|
|
Загрузка…
Ссылка в новой задаче