Closed Bug 1458208 Opened 7 years ago Closed 6 years ago

telemetry.js: DevTools code should always go through telemetry.js

Categories

(DevTools :: General, enhancement, P2)

57 Branch
enhancement

Tracking

(firefox62 fixed)

RESOLVED FIXED
Firefox 62
Tracking Status
firefox62 --- fixed

People

(Reporter: miker, Assigned: miker)

References

Details

Attachments

(1 file, 2 obsolete files)

All the code in DevTools should interact with Telemetry in the same way. DevTools call sites that rely on Services.telemetry should be migrated to the helper.
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Attachment #8974702 - Attachment is obsolete: true
Attachment #8974732 - Attachment is obsolete: true
Comment on attachment 8974751 [details] Bug 1458208 - telemetry.js: DevTools code should always go through telemetry.js https://reviewboard.mozilla.org/r/243136/#review248992 Thanks for the patch Mike. Reading this, I realize my last item in the RFC needed more reflexion. I should have tried doing it rather than just suggesting. "All the code in DevTools should interact with Telemetry in the same way. DevTools call sites that rely on Services.telemetry should be migrated to the helper." When writing that, I assumed most of our usage of Services.telemetry was to call methods that were also available in our helper. In other words I was not expecting to extend the API of our helper to expose more methods of Services.telemetry. Looking at how much this complexifies our telemetry helper, I am not sure this will be worth the added value and the maintainance cost. Really sorry about having second thoughts here, I realize that this was probably a really tricky patch to write :(
Attachment #8974751 - Flags: review?(jdescottes)
So let's comprimize and allow tests to access telemetry directly... this removes 95 - 100% of the changes to telemetry.js anyhow.
Comment on attachment 8974751 [details] Bug 1458208 - telemetry.js: DevTools code should always go through telemetry.js https://reviewboard.mozilla.org/r/243136/#review250534 Great, works for me! ::: devtools/client/shared/telemetry.js:40 (Diff revision 3) > } > > /** > + * Time since the system wide epoch. This is not a monotonic timer but > + * can be used across process boundaries. > + */ Can we mention in the JSDoc that this getter returns a function, and not the time directly?
Attachment #8974751 - Flags: review?(jdescottes) → review+
Comment on attachment 8974751 [details] Bug 1458208 - telemetry.js: DevTools code should always go through telemetry.js https://reviewboard.mozilla.org/r/243136/#review251352 ::: devtools/client/shared/telemetry.js:40 (Diff revision 3) > } > > /** > + * Time since the system wide epoch. This is not a monotonic timer but > + * can be used across process boundaries. > + */ I have changed it to a normal function instead of a getter to clear up any confusion.
Pushed by mratcliffe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e556da5bf73 telemetry.js: DevTools code should always go through telemetry.js r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: