Closed Bug 1455270 Opened Last year Closed Last year

Instrument toolbox panel exit with event telemetry

Categories

(DevTools :: General, enhancement, P2)

57 Branch
enhancement

Tracking

(firefox61 fixed)

RESOLVED FIXED
Firefox 61
Tracking Status
firefox61 --- fixed

People

(Reporter: miker, Assigned: miker)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

devtools.main:
  exit:
    objects: ["console", "inspector", "debugger", "style_editor", "network_monitor", "storage_inspector", "other"]
    bug_numbers: [1455270]
    notification_emails: ["dev-developer-tools@lists.mozilla.org", "hkirschner@mozilla.com"]
    record_in_processes: ["main"]
    description: User closes a tool in the devtools toolbox.
    release_channel_collection: opt-out
    expiry_version: never
    extra_keys:
      host: "Toolbox host (positioning): bottom, side, window or other."
      width: Toolbox width rounded up to the nearest 50px.
      next_panel: The name of the panel opened, console, inspector, debugger, style_editor, network_monitor, storage_inspector or other.
      reason: tab_switch, toolbox_close, inspect_dom, paused_on_exception, jump_to_file, jump_to_line, debugger_statement, breakpoint, conditional_breakpoint, tab_click etc.
So we need to gather the following:

1. Services.telemetry.recordEvent("devtools.main", "exit", "console", null, {
     "host": "...",
     "width": "...",
     "next_panel": "...",
     "reason": "..."
   });
2. Services.telemetry.recordEvent("devtools.main", "exit", "inspector", null, {
     "host": "...",
     "width": "...",
     "next_panel": "...",
     "reason": "..."
   });
3. Services.telemetry.recordEvent("devtools.main", "exit", "debugger", null, {
     "host": "...",
     "width": "...",
     "next_panel": "...",
     "reason": "..."
   });
4. Services.telemetry.recordEvent("devtools.main", "exit", "style_editor", null, {
     "host": "...",
     "width": "...",
     "next_panel": "...",
     "reason": "..."
   });
5. Services.telemetry.recordEvent("devtools.main", "exit", "network_monitor", null, {
     "host": "...",
     "width": "...",
     "next_panel": "...",
     "reason": "..."
   });
6. Services.telemetry.recordEvent("devtools.main", "exit", "storage_inspector", null, {
     "host": "...",
     "width": "...",
     "next_panel": "...",
     "reason": "..."
   });
7. Services.telemetry.recordEvent("devtools.main", "exit", "other", null, {
     "host": "...",
     "width": "...",
     "next_panel": "...",
     "reason": "..."
   });
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
Attached file data-review.txt
Attachment #8969240 - Flags: review?(andrei.br92)
Priority: -- → P2
tab_click should be tab_switch
Attachment #8969240 - Flags: review?(andrei.br92) → review?(francois)
Comment on attachment 8969240 [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 #8969240 - Flags: review?(francois) → review+
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Comment on attachment 8970140 [details]
Bug 1455270 - Instrument toolbox panel exit with event telemetry

https://reviewboard.mozilla.org/r/238946/#review244566

looks good. the regex is a little long though and reused 3 times -- might be worth refactoring!

::: devtools/client/framework/toolbox.js:1889
(Diff revision 1)
>      if (!/webconsole|inspector|jsdebugger|styleeditor|netmonitor|storage/.test(id)) {
>        panelName = "other";
>      }
>  
> +    let prevPanelName = this.currentToolId;
> +    if (!/webconsole|inspector|jsdebugger|styleeditor|netmonitor|storage/

this seems to be exactly the same regex as 1884 and 2833, maybe they can be combined? the lines are quite long to read
Attachment #8970140 - Flags: review?(ystartsev) → review+
Comment on attachment 8970140 [details]
Bug 1455270 - Instrument toolbox panel exit with event telemetry

https://reviewboard.mozilla.org/r/238946/#review244924

::: devtools/client/framework/toolbox.js:1889
(Diff revision 1)
>      if (!/webconsole|inspector|jsdebugger|styleeditor|netmonitor|storage/.test(id)) {
>        panelName = "other";
>      }
>  
> +    let prevPanelName = this.currentToolId;
> +    if (!/webconsole|inspector|jsdebugger|styleeditor|netmonitor|storage/

Moved the regex to a const at the top of the file and moved the logic into a helper function... much tidier now.
Pushed by mratcliffe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f6812edca4ea
Instrument toolbox panel exit with event telemetry r=yulia
https://hg.mozilla.org/mozilla-central/rev/f6812edca4ea
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Moving to M1 for splitting off M2 work.
Product: Firefox → DevTools
Depends on: 1474379
You need to log in before you can comment on or make changes to this bug.