Closed
Bug 1180793
Opened 9 years ago
Closed 9 years ago
[New Gaia Architecture][Metrics] Hud should report specific app for those Apps housed under "Communications"
Categories
(Firefox OS Graveyard :: Gaia::System, defect)
Tracking
(firefox43 fixed)
RESOLVED
FIXED
FxOS-S6 (04Sep)
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: thills, Assigned: rnicoletti)
References
Details
Attachments
(1 file, 4 obsolete files)
4.64 KB,
patch
|
Details | Diff | Splinter Review |
Currently, contacts, phone, and SMS are all under the Communications App Manifest. For more granular metrics reporting, it will be good have have the hud identify the sub-app vs. just "communications".
Reporter | ||
Updated•9 years ago
|
Blocks: nga-telemetry
Assignee | ||
Comment 1•9 years ago
|
||
I have a patch for this I will be attaching shortly. I uses the frame's 'src' attribute to find the app name when the manifest "app name" is 'communications'
Assignee: nobody → rnicoletti
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8651214 -
Flags: feedback?(janx)
Assignee | ||
Comment 3•9 years ago
|
||
This is a rebased patch.
Attachment #8652054 -
Flags: review?(janx)
Assignee | ||
Updated•9 years ago
|
Attachment #8651214 -
Attachment is obsolete: true
Attachment #8651214 -
Flags: feedback?(janx)
Comment 4•9 years ago
|
||
Comment on attachment 8652054 [details] [diff] [review] properly report names of communications apps Review of attachment 8652054 [details] [diff] [review]: ----------------------------------------------------------------- Thanks Russ! Just a few nits but they should be easy to fix. ::: b2g/chrome/content/devtools/hud.js @@ +210,5 @@ > }, > > + get appName() { > + > + if (!this._appName) { Nit: Prefer bail-out style: > if (this._appName) { > return this._appName; > } > // rest of code not indented @@ -339,5 @@ > > - if (!this.appName) { > - let manifest = this.manifest; > - if (!manifest) { > - return; When there is no manifest, `_logHistogram()` used to return here instead of continuing. You changed this behavior: Now when there is no manifest, `metric.appName` will just be set to `null` and the function will continue. Is this the new expected behavior?
Attachment #8652054 -
Flags: review?(janx) → feedback+
Assignee | ||
Comment 5•9 years ago
|
||
Thanks for catching the change in behavior caused by my patch. That was unintentional. I'm now logging an error for that situation because I don't like silently failing.
Attachment #8652054 -
Attachment is obsolete: true
Attachment #8652413 -
Flags: review?(janx)
Comment 6•9 years ago
|
||
Comment on attachment 8652413 [details] [diff] [review] properly report names of communications apps Review of attachment 8652413 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me! A few very minor nits: You can choose to address them now, or in a subsequent patch, but I'm OK with this patch as it is. ::: b2g/chrome/content/devtools/hud.js @@ +217,5 @@ > + > + let manifest = this.manifest; > + if (!manifest) { > + let msg = DEVELOPER_HUD_LOG_PREFIX + ': Unable to determine app for telemetry metric. src: ' + > + this.frame.src; Nit: Trailing space. @@ +218,5 @@ > + let manifest = this.manifest; > + if (!manifest) { > + let msg = DEVELOPER_HUD_LOG_PREFIX + ': Unable to determine app for telemetry metric. src: ' + > + this.frame.src; > + console.error(msg); Nit: Maybe at some point all the prefixed `console.error()` calls could become a helper function? (e.g. `telemetryError()` or `developerHUD.logError()`) But it's fairly unimportant, we don't have to address this now. @@ +386,5 @@ > let keyed = Services.telemetry.getKeyedHistogramById(keyedMetricName); > if (keyed) { > keyed.add(metric.appName, parseInt(metric.value, 10)); > developerHUD._histograms.add(keyedMetricName); > + telemetryDebug(keyedMetricName + ', ' + metric.value + ', ' + metric.appName); Nit: If you don't care about commas, you could also log them this way: `telemetryDebug(keyedMetricName, metric.value, metric.appName)`, the proxied `console.log()` will separate these values with spaces, and won't have to coerce the values to a single string.
Attachment #8652413 -
Flags: review?(janx) → review+
Assignee | ||
Comment 7•9 years ago
|
||
Updated patch, addressing final review nits Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4bc4b4cc673c
Attachment #8652413 -
Attachment is obsolete: true
Assignee | ||
Comment 8•9 years ago
|
||
Rebased patch. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6474bb688d11
Attachment #8653190 -
Attachment is obsolete: true
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 10•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/527c66668f40
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → FxOS-S6 (04Sep)
You need to log in
before you can comment on or make changes to this bug.
Description
•