Use a different telemetry histogram key for the userScripts injection

VERIFIED FIXED in Firefox 64

Status

enhancement
P1
normal
VERIFIED FIXED
Last year
9 months ago

People

(Reporter: rpl, Assigned: rpl)

Tracking

(Blocks 1 bug)

unspecified
mozilla64
Dependency tree / graph

Firefox Tracking Flags

(firefox64 verified)

Details

Attachments

(5 attachments)

Assignee

Description

Last year
This is a follow up for Bug 1437861, which is going to introduce APIs to inject userScripts.

We would like to track the userScripts "time to inject" in a different telemetry histogram from the one currently used to track the "time to inject" of the regular extensions' contentScripts.
Assignee

Updated

Last year
Blocks: 1437098
Depends on: 1437861
Assignee

Updated

Last year
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Priority: -- → P1
Assignee

Comment 2

10 months ago
This patch adds a new telemetry histogram for the userScripts injection time and adds an additional test case to verify that the expected telemetry histograms are being updated.

This phabricator revision depends on the following bugs and their related mozreview requests:

- [Bug 1437861](https://bugzilla.mozilla.org/1437861) Implement userScripts.register and execute userScripts js code in isolated sandboxes (https://reviewboard.mozilla.org/r/219856/)
- [Bug 1437864](https://bugzilla.mozilla.org/1437866) Implement userScripts API methods to allow an extension to inject custom APIs in the isolated userScripts sandboxes (https://reviewboard.mozilla.org/r/220630/)
Comment on attachment 9002789 [details]
Bug 1470466 - Use a different telemetry histogram key for the userScripts injection.

Shane Caraveo (:mixedpuppy) has approved the revision.
Attachment #9002789 - Flags: review+

Comment 4

10 months ago
Comment on attachment 9002780 [details]
data-review-request-bug-1470466-userScripts-telemetry.md

Preliminary comments: 

Your answer to "What questions will you answer with this data?" wasn't a list of questions. Your answer to #2 fills in some of the blanks that this is a performance metric and thus we can map to "What performance do users see in the wild? Will specific code changes make measured performance worse or better?". If this isn't correct, please let me know and I'll re-evaluate.

( In short, "To collect data" isn't a question :D )

DATA COLLECTION REVIEW RESPONSE:

    Is there or will there be documentation that describes the schema for the ultimate data set available publicly, complete and accurate?

Standard Telemetry mechanisms apply.

    Is there a control mechanism that allows the user to turn the data collection on and off? 

Standard Telemetry mechanisms apply.

    If the request is for permanent data collection, is there someone who will monitor the data over time?**

N/A, expires in 67

    Using the category system of data types on the Mozilla wiki, what collection type of data do the requested measurements fall under?

Category 1

    Is the data collection request for default-on or default-off?

default-on

    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.

    Is the data collection covered by the existing Firefox privacy notice? 

Yes.

    Does there need to be a check-in in the future to determine whether to renew the data? (Yes/No)

Yes. :rpl is responsible for filing any follow-up bugs to remove or renew this probe before it expires.

----
Result: datareview+
Attachment #9002780 - Flags: review?(chutten) → review+
Comment on attachment 9002789 [details]
Bug 1470466 - Use a different telemetry histogram key for the userScripts injection.

Jan-Erik Rediger [:janerik] has approved the revision.
Attachment #9002789 - Flags: review+
Assignee

Comment 6

10 months ago
(In reply to Chris H-C :chutten from comment #4)
> Comment on attachment 9002780 [details]
> data-review-request-bug-1470466-userScripts-telemetry.md
> 
> Preliminary comments: 
> 
> Your answer to "What questions will you answer with this data?" wasn't a
> list of questions. Your answer to #2 fills in some of the blanks that this
> is a performance metric and thus we can map to "What performance do users
> see in the wild? Will specific code changes make measured performance worse
> or better?". If this isn't correct, please let me know and I'll re-evaluate.
> 
> ( In short, "To collect data" isn't a question :D )

Ouch, yeah I definitely put the wrong content in that question, sorry.

Thanks for "filling the blanks" by retrieving and translating the answer 
to the second question in what it should have been the content of the first one, 
your interpretation is correct (and lesson learned on my side).

Comment 7

10 months ago
Oh good, I didn't want to hold up work just because the form was a little strange :)
Assignee

Updated

10 months ago
Iteration: --- → 64.1 (Sep 14)

Comment 8

10 months ago
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/a6185abfc2f8
Use a different telemetry histogram key for the userScripts injection. r=janerik,mixedpuppy
Assignee

Comment 10

10 months ago
See Bug 1437861 Comment 41.
Flags: needinfo?(lgreco)

Comment 11

10 months ago
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/544dbfdb5b05
Use a different telemetry histogram key for the userScripts injection. r=janerik,mixedpuppy

Comment 12

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/544dbfdb5b05
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee

Comment 13

9 months ago
For the QA verification of this issue, install the the test extension and run some of the test plans from Bug 1437861 comment 44, then navigate a new tab to "about:telemetry" and search for the userScripts histograms (the general
and the keyed histogram):

- in "about:telemetry", select "Histograms" from the page sidebar, select the "content" process in the select from the upper-right corner and search for the "WEBEXT_USER_SCRIPT_INJECTION_MS" histogram

- in "about:telemetry", select "Keyed Histograms" from the page sidebar, select the "content" process and search for the "WEBEXT_USER_SCRIPT_INJECTION_MS_BY_ADDONID" histogram and look for the keyed histogram with key "user-script-example@mozilla.org"

Comment 14

9 months ago
Verified as fixed following the steps from https://bugzilla.mozilla.org/show_bug.cgi?id=1470466#c13.

I will add postfix screenshots.
Status: RESOLVED → VERIFIED

Comment 15

9 months ago
Posted image Postfix screenshot 1

Comment 16

9 months ago
Posted image Postfix screenshot 2

Comment 17

9 months ago
Luca observed that first postfix screenshot is not the correct one. I will attach another postfix screenshot for first case.

Comment 18

9 months ago
Posted image Postfix screenshot 3
You need to log in before you can comment on or make changes to this bug.