Develop an integration test for addons that register dynamic probes
Categories
(Toolkit :: Telemetry, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: raphael, Assigned: b4hand)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Bug 1556057 - Develop an integration test for addons that register dynamic probes; r?raphael,chutten
48 bytes,
text/x-phabricator-request
|
Details | Review |
Extend the telemetry-tests-client suite with a test focused on verifying that we can install addons that register dynamic probes and record to them.
Updated•5 years ago
|
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
What type of addon would register a dynamic probe? Could I get some more information on what that means, and how I can test it? TIA
Comment 2•4 years ago
|
||
Mozilla-privileged addons have access to these APIs which include registerScalars
and registerEvents
. Think of an addon that adds a new feature (like Multi-Account Containers) -- it may want to instrument the feature it has added (to measure engagement, performance, stability, etc). There is no instrumentation in the browser and no probes in its Scalars.yaml, so the addon needs to describe the data collections it might want to accumulate data to.
Assignee | ||
Comment 3•4 years ago
|
||
Will this be tested against all versions of Firefox? Versions being Nightly, Beta, etc. Also, do we know of any current Mozilla extensions that use dynamic probes? I am wondering if we can just use one of them instead of rolling our own.
Comment 4•4 years ago
|
||
A quick scan of dynamic
process probes shows Normandy as a big user: https://sql.telemetry.mozilla.org/queries/75553/source
As for all versions: yes. To my knowledge, at present tt(c)
runs on all releases. If it simplifies things, we can filter things down to only specific channels to start, and then widen to all channels as a follow-up.
Assignee | ||
Comment 5•3 years ago
|
||
Does this look good enough for an extension? I have tested it and it works but before I add it to the mozilla-extensions
github org, I would like your thoughts.
browser.telemetry.registerScalars("dynamic.probe", {
"counter_scalar": {
kind: "count",
keyed: false,
record_on_release: false
},
});
browser.telemetry.scalarSet("dynamic.probe.counter_scalar", 1337);
Comment 6•3 years ago
|
||
You might want record_on_release: true
to ensure we can run it on all channels, not just "nightly" and "beta", but otherwise it looks good to me!
Assignee | ||
Comment 7•3 years ago
|
||
Adding the extension https://github.com/mozilla-extensions/xpi-manifest/pull/81, will allow it to be built on taskcluster with elevated permissions
Comment 8•3 years ago
|
||
Could someone explain what this adds in terms of testing that is not already covered in: https://searchfox.org/mozilla-central/source/toolkit/components/extensions/test/xpcshell/test_ext_telemetry.js
Assignee | ||
Comment 9•3 years ago
|
||
(In reply to Shane Caraveo (:mixedpuppy) from comment #8)
Could someone explain what this adds in terms of testing that is not already covered in: https://searchfox.org/mozilla-central/source/toolkit/components/extensions/test/xpcshell/test_ext_telemetry.js
Hi Shane, sorry for the delayed response.
This test is a Marionette test, and is more of an e2e test than test_ext_telemetry.js
is. The idea here is to test a real workflow, one that users will use, to make sure that there are no hangups along the way. Verifying that the entire telemetry payload, as well as the correct events, are sent to the telemetry server is what we are after for this test.
It is probably a good idea to reference test_ext_telemetry.js
as a comment in this test though.
Assignee | ||
Comment 10•3 years ago
|
||
Hi Shane, I would like to know your thoughts on the above. Thanks.
Comment 11•3 years ago
|
||
If an end to end test is desired that is fine. if it runs against a live (test) telemetry server that may be a bonus. If it doesn't, I think the current tests cover installing an addon and registering dynamic probes.
Assignee | ||
Comment 12•3 years ago
|
||
Assignee | ||
Comment 13•3 years ago
|
||
As discussed on slack/zoom, I am running into some issues with this test. Here is what I have tried, all of which are unsuccessful.
- I have tried to check the main ping for the scalar by restarting the browser after the addon is installed.
- Add a delay after the addon installation
- Restart the browser multiple times and check for the scalar to appear in the ping.
I am wondering if the extension itself needs some improvements to the way it sends the dynamic probe but I am not sure.
Reporter | ||
Comment 14•3 years ago
|
||
I added my comments to the Phabricator Diff. Please investigate whether installing the signed addon with temp=False
solves the issue with restarting the browser.
Clearing the ni request for :chutten here while you look into this.
Assignee | ||
Comment 15•3 years ago
|
||
(In reply to Raphael Pierzina [:raphael] UTC+02:00 from comment #14)
I added my comments to the Phabricator Diff. Please investigate whether installing the signed addon with
temp=False
solves the issue with restarting the browser.Clearing the ni request for :chutten here while you look into this.
This looks to have fixed it. Do we even need the temp
flag for this suite?
Assignee | ||
Comment 16•3 years ago
|
||
Looks like temp
is needed for the other unsigned addon.
Reporter | ||
Comment 17•3 years ago
|
||
(In reply to Benjamin Forehand Jr[:b4hand] from comment #16)
Looks like
temp
is needed for the other unsigned addon.
Yes, exactly. We need to add temp
as a keyword argument to the internal install addon method.
Comment 18•3 years ago
|
||
Pushed by rpierzina@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a6861c17708e Develop an integration test for addons that register dynamic probes; r=raphael,chutten
Comment 19•3 years ago
|
||
bugherder |
Description
•