Closed
Bug 1193588
Opened 9 years ago
Closed 9 years ago
[Metrics] Add pref for HUD telemetry logging
Categories
(Firefox OS Graveyard :: Developer Tools, defect)
Tracking
(firefox46 fixed)
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: rnicoletti, Assigned: rnicoletti)
References
Details
Attachments
(1 file, 2 obsolete files)
1.01 KB,
patch
|
Details | Diff | Splinter Review |
Currently, the HUD backend will log telemetry events based on variable in the js. This is not ideal, as some of the metrics generate many events which will create a lot of noise in the log that most developers will not want to see.
Developers should be able to enable and disable HUD telemetry logging using a pref.
Assignee | ||
Comment 1•9 years ago
|
||
Jan, I have created a new pref for "enhanced metrics" logging. I considered using the existing "hud.logging" but I decided HUD logging and telemetry logging should be separate. Thanks in advance for your feedback!
Attachment #8681540 -
Flags: feedback?(janx)
Updated•9 years ago
|
QA Whiteboard: [COM=Telemetry]
Comment 2•9 years ago
|
||
Comment on attachment 8681540 [details] [diff] [review]
telemetry_logging.patch
Review of attachment 8681540 [details] [diff] [review]:
-----------------------------------------------------------------
Feedback+ with nits. Please don't create a pref associated to the setting (since we only need the latter).
Are you planning to expose this in the Settings app? If so, where? I feel like the Developer HUD panel is getting crowded with checkboxes already.
::: b2g/app/b2g.js
@@ +1152,5 @@
> pref("b2g.multiscreen.chrome_remote_url", "chrome://b2g/content/shell_remote.html");
> pref("b2g.multiscreen.system_remote_url", "index_remote.html");
>
> +// Enhanced metrics (telemetry)
> +pref("metrics.level.enhanced.logging": "false");
No need to create an associated pref, we just need the setting here.
::: b2g/chrome/content/devtools/hud.js
@@ +111,5 @@
> SettingsListener.observe('metrics.selectedMetrics.level', "", level => {
> this._telemetry = (level === 'Enhanced');
> });
> +
> + SettingsListener.observe('metrics.level.enhanced.logging', this._telemetryDebug, enabled => {
Please don't use unnecessarily long setting names, unless you're certain there will be other settings also starting with "metrics.level.enhanced.*" or even "metrics.level.*".
On a side-note, "metrics.selectedMetrics.level" I also find unnecessarily long, because there are no other settings called "metrics.selectedMetrics.*" (i.e. "metrics.level" would have worked fine). No point in fixing this though, because the code is already landed (and I r+'d the gecko patch).
If you're unsure about "metrics.logging", may I suggest "metrics.enhanced.logging"?
::: b2g/chrome/content/settings.js
@@ +667,5 @@
> // Restart required
> 'layers.async-pan-zoom.enabled': false,
> #endif
> 'layout.display-list.dump': false,
> + 'metrics.level.enhanced.logging': false,
As above, no need to map the setting to a pref.
Attachment #8681540 -
Flags: feedback?(janx) → feedback+
Assignee | ||
Comment 3•9 years ago
|
||
Because it will be rarely used, I wasn't planning on exposing it in the Settings app (although I think the |Developer| screen, in the |Debug| section would be appropriate). The main benefit I see of exposing it would be so developers know it exists. What's your opinion about that tradeoff of adding a checkbox to publicize the setting (yet another checkbox) vs. not cluttering the Developer settings and essentially having a secret setting?
About the setting name, after discussing with Tamara, we want this setting to control only HUD telemetry logging not HUD *and* gaia telemetry logging. In that case, "hud.telemetry.logging" would be consistent with the existing HUD settings. What do you think?
Flags: needinfo?(janx)
Comment 4•9 years ago
|
||
(Very busy at the moment, will look at this in a few days -- sorry for the delay!)
Assignee | ||
Comment 5•9 years ago
|
||
I'd like to get your opinion regarding comment 3.
Flags: needinfo?(jryans)
(In reply to Russ Nicoletti [:russn] from comment #3)
> Because it will be rarely used, I wasn't planning on exposing it in the
> Settings app (although I think the |Developer| screen, in the |Debug|
> section would be appropriate). The main benefit I see of exposing it would
> be so developers know it exists. What's your opinion about that tradeoff of
> adding a checkbox to publicize the setting (yet another checkbox) vs. not
> cluttering the Developer settings and essentially having a secret setting?
I don't have a strong opinion about this. If you think a visible Developer setting would be convenient to have, maybe you should add one. It seems like you don't see any value, so I'd say leave it out. You can still control it from WebIDE, and can always expose in the UI later if desired.
> About the setting name, after discussing with Tamara, we want this setting
> to control only HUD telemetry logging not HUD *and* gaia telemetry logging.
> In that case, "hud.telemetry.logging" would be consistent with the existing
> HUD settings. What do you think?
Sounds fine, but :janx likely will have a stronger opinion than me.
Flags: needinfo?(jryans)
Comment 7•9 years ago
|
||
Thank you Ryan for helping out here!
(In reply to Russ Nicoletti [:russn] from comment #3)
> Because it will be rarely used, I wasn't planning on exposing it in the
> Settings app (although I think the |Developer| screen, in the |Debug|
> section would be appropriate). The main benefit I see of exposing it would
> be so developers know it exists. What's your opinion about that tradeoff of
> adding a checkbox to publicize the setting (yet another checkbox) vs. not
> cluttering the Developer settings and essentially having a secret setting?
Not exposing it in the Settings app sounds good to me (and your suggested location would work by the way).
Are you just creating the setting to turn logging off by default now, but leave the possibility to re-enable it later? (E.g. by the user with help of WebIDE, or changing its default value to "true" in debug builds / a future release if necessary). In that case it's fine to hide it by default, and as Ryan said, it's always possible to expose it later should the need arise.
> About the setting name, after discussing with Tamara, we want this setting
> to control only HUD telemetry logging not HUD *and* gaia telemetry logging.
> In that case, "hud.telemetry.logging" would be consistent with the existing
> HUD settings. What do you think?
Perfect! Thank you for that, I'll r+ your patch with that setting name and nits addressed.
Again, sorry for the week-long lag. This shouldn't happen in normal conditions.
Flags: needinfo?(janx)
Assignee | ||
Comment 8•9 years ago
|
||
Hi Jan, attached is the updated patch for your review.
Attachment #8681540 -
Attachment is obsolete: true
Attachment #8696009 -
Flags: review?(janx)
Comment 9•9 years ago
|
||
Comment on attachment 8696009 [details] [diff] [review]
telemetry_logging.patch
Review of attachment 8696009 [details] [diff] [review]:
-----------------------------------------------------------------
R+ with one nit. Thanks for addressing my earlier comments!
::: b2g/chrome/content/devtools/hud.js
@@ +107,5 @@
> SettingsListener.observe('hud.logging', this._logging, enabled => {
> this._logging = enabled;
> });
>
> + SettingsListener.observe('hud.telemetry.logging', this._telemetryDebug, enabled => {
Nit: `this._telemetryDebug` is undefined here, you probably meant just `_telemetryDebug`.
Attachment #8696009 -
Flags: review?(janx) → review+
Updated•9 years ago
|
Assignee: nobody → rnicoletti
Assignee | ||
Comment 10•9 years ago
|
||
Updated patch addressing final nit.
Attachment #8696009 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
Status: NEW → ASSIGNED
Keywords: checkin-needed
Comment 12•9 years ago
|
||
Keywords: checkin-needed
Comment 13•9 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•