Closed Bug 1483002 Opened 2 years ago Closed Last year

Create WEBEXT probes keyed by addon_id

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(firefox64 verified)

VERIFIED FIXED
mozilla64
Iteration:
64.1 - Sep 14
Tracking Status
firefox64 --- verified

People

(Reporter: bmiroglio, Assigned: rpl)

References

Details

Attachments

(3 files)

We currently have the following WEBEXT_* probes in Telemetry: https://telemetry.mozilla.org/probe-dictionary/?search=WEBEXT_

These probes are aggregated across all webextensions, which makes it nearly impossible to understand an individual webextension's performance (unless it is the *only* webextension in a user's environment).

I'd like to have keyed histograms of the following probes, each keyed by addon_id:

 WEBEXT_BACKGROUND_PAGE_LOAD_MS
 WEBEXT_BROWSERACTION_POPUP_OPEN_MS
 WEBEXT_BROWSERACTION_POPUP_PRELOAD_RESULT_COUNT
 WEBEXT_CONTENT_SCRIPT_INJECTION_MS
 WEBEXT_EXTENSION_STARTUP_MS
 WEBEXT_PAGEACTION_POPUP_OPEN_MS

This seems to be possible, given the STORAGE_SYNC_* probes are structured in this way, e.g. https://mzl.la/2w5rmuK.
Component: Add-ons Manager → General
Product: Toolkit → WebExtensions
I briefly took a look and the `TelemetryStopWatch` (that we use for the *_MS histograms) supports the methods `TelemetryStopwatch.startKeyed/finishKeyed/cancelKeyed` that we can use to make these probes keyed by `addon_id`.

For the `WEBEXT_BROWSERACTION_POPUP_PRELOAD_RESULT_COUNT` we can retrieve a keyed histogram using `Services.telemetry.getKeyedHistogramById`, and then we can call it as`keyedHistogram.add(extension.id, "...")` (instead of `histogram.add("...")` as we do currently for the non-keyed histogram: https://searchfox.org/mozilla-central/rev/2466b82b729765fb0a3ab62f812c1a96a7362478/browser/components/extensions/parent/ext-browserAction.js#203-204)
Assignee: nobody → lgreco
Blocks: 1465143
Status: NEW → ASSIGNED
Priority: -- → P2
Data review request for the additional telemetry probes keyed by addon id.
Attachment #9004523 - Flags: review?(chutten)
This patch contains a set of changes needed to add WEBEXT telemetry probes keyed by addon id.

The telemetry probes keyed by addon id has been added as separate telemetry histograms
named after the related generic WEBEXT probe with the additional "_BY_ADDONID" suffix.

A set of small helper methods have been defined in a new ExtensionTelemetry object, exported
by the ExtensionUtils.jsm.
Comment on attachment 9004524 [details]
Bug 1483002 - Added WEBEXT probes keyed by addon id.

Jan-Erik Rediger [:janerik] has approved the revision.
Attachment #9004524 - Flags: review+
Comment on attachment 9004523 [details]
request-data-review-bug-1483002-probes-keyed-by-addonid.md

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 2. The addon ids are Interaction data, as they show what addons the user has interacted with in the past.

    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)?

Not new, but it does include the ids of addons in the same way STORAGE_SYNC_* do.

    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. :rpl will be responsible for renewing or removing the probe before its expiry.

----
Result: datareview+
Attachment #9004523 - Flags: review?(chutten) → review+
Comment on attachment 9004524 [details]
Bug 1483002 - Added WEBEXT probes keyed by addon id.

Shane Caraveo (:mixedpuppy) has approved the revision.
Attachment #9004524 - Flags: review+
Iteration: --- → 64.1 (Sep 14)
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/9b7d4a94002a
Added WEBEXT probes keyed by addon id. r=janerik,mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/9b7d4a94002a
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Attached image Bug1483002.gif
This issue is verified as fixed on Firefox 64.0a1(20180906100252) under Win 7 64-bit and Mac OS X 10.13.3.

Please see the attached video.
Status: RESOLVED → VERIFIED
Depends on: 1489315
You need to log in before you can comment on or make changes to this bug.