Closed Bug 1167689 Opened 10 years ago Closed 10 years ago

Omit the "addonHistograms" key entirely if there is no histogram data

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: mreid, Assigned: azhang)

References

Details

Attachments

(1 file, 1 obsolete file)

Telemetry currently reports "addonHistogram":{} when there is nothing to report. We should just skip that key if there's no data.
Assignee: nobody → azhang
Status: NEW → ASSIGNED
Comment on attachment 8610245 [details] [diff] [review] optional-addon-histograms.patch Review of attachment 8610245 [details] [diff] [review]: ----------------------------------------------------------------- Do an "hg export" before you upload patches so that your author information, commit comments, etc is in the patch. Then the patch file can be landed directly from the bug by setting the checkin-needed tag on the bug's Whiteboard field ::: toolkit/components/telemetry/TelemetrySession.jsm @@ +1379,5 @@ > payloadObj.lateWrites = Telemetry.lateWrites; > + > + // Add the addon histograms if they are present > + let addonHistograms = this.getAddonHistograms(); > + for (let name in addonHistograms) { this is a bit hacky.. how about: if (Object.keys(addonHistograms).length) { payloadObj.addonHistograms = addonHistograms; }
Attachment #8610245 - Flags: review?(vdjeric)
Attachment #8610245 - Attachment is obsolete: true
Attachment #8610663 - Flags: review?(vdjeric)
Attachment #8610663 - Flags: review?(vdjeric) → review+
Oh and usually you'll need to add r=<reviewer's irc nick> to the end of your commit message
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Depends on: 1169753
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: