Closed
Bug 1143090
Opened 10 years ago
Closed 7 years ago
Enable recording Telemetry locally for mochitests and disable its submission
Categories
(Toolkit :: Telemetry, defect)
Toolkit
Telemetry
Tracking
()
RESOLVED
FIXED
People
(Reporter: overholt, Unassigned)
Details
I am writing a Telemetry probe and would like to be able to verify it is collected properly in a mochitest. After some headscratching and discussion with Vladan, it appears we don't have Telemetry enabled while running mochitests; it would be nice if we did.
Comment 1•10 years ago
|
||
We don't want to submit this telemetry data to the server, though, right?
Comment 2•10 years ago
|
||
I was just trying to write a mochitest for verifying telemetry and probably would have been very confused by things not being counted, so this is a timely bug.
Reporter | ||
Comment 3•10 years ago
|
||
(In reply to Mark Reid [:mreid] from comment #1)
> We don't want to submit this telemetry data to the server, though, right?
Correct (IMO).
Updated•10 years ago
|
Summary: Enable Telemetry for mochitests → Enable Telemetry for mochitests and disable only its submission
Updated•10 years ago
|
Summary: Enable Telemetry for mochitests and disable only its submission → Enable recording Telemetry locally for mochitests and disable its submission
Comment 4•10 years ago
|
||
Andrew, Vladan asked me to help with this if you have any question. How urgent is that work?
Flags: needinfo?(overholt)
Reporter | ||
Comment 5•10 years ago
|
||
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #4)
> Andrew, Vladan asked me to help with this if you have any question. How
> urgent is that work?
Oh, it's not. I'll land my probe without a test as it seems that's what's normally done :) But I'll watch here and add a test when this is ready. Thanks!
Flags: needinfo?(overholt)
Comment 6•10 years ago
|
||
In the meantime, I believe that the following snippet is sufficient:
let oldCanRecord = Services.telemetry.canRecord;
Services.telemetry.canRecord = true;
registerCleanupFunction(() => {
Services.telemetry.canRecord = oldCanRecord;
});
That's what I use in my test code that needs to play with Telemetry.
Comment 7•7 years ago
|
||
We already disable submission on non-official builds, and mochitests can enable telemetry collection.
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•