Closed Bug 1176986 Opened 9 years ago Closed 9 years ago

[Metrics]Write AdvancedTelemetry Metrics to AsynchStorage to persist in between shipping them

Categories

(Firefox OS Graveyard :: Gaia::System, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: thills, Assigned: thills)

References

Details

Attachments

(1 file)

Need to save the AdvancedTelemetry Metrics to asyncStorage in a manner similar to what is being done with AppUsageMetrics. We want to save the metrics in case user shuts down the phone so we don't lose the metrics in between that time.
Assignee: nobody → thills
Status: NEW → ASSIGNED
Implementation plan is as follows: We will have a merge function in AdvancedTelemetry that will merge previously collected data stored in asyncStorage with newly collected data coming from the Telemetry histogram snapshots in gecko's hud.js. Merge can be called in one of the following cases (still tbd): 1) When the device is shutdown, if AdvancedTelemetry can detect this, we can pull the metrics and save them to asyncStorage before the shutdown. Then when it comes time to send, the merge function can be called to merge the two. 2) We can periodically persist the metrics (perhaps hourly) when we receive an idle event in system (similar to how AUM does it). Will investigate the capability to detect shutdown first.
Comment on attachment 8657335 [details] [gaia] tamarahills:bugfix/1176986-persist-metrics-after-reboot > mozilla-b2g:master Hi Russ, I still have some work to do on this with testing the idle events, but I would love your feedback on what's there so far. Thanks much, -tamara
Attachment #8657335 - Flags: feedback?(rnicoletti)
Comment on attachment 8657335 [details] [gaia] tamarahills:bugfix/1176986-persist-metrics-after-reboot > mozilla-b2g:master Hi Tamara, I've updated the PR with some comments.
Attachment #8657335 - Flags: feedback?(rnicoletti) → feedback+
Comment on attachment 8657335 [details] [gaia] tamarahills:bugfix/1176986-persist-metrics-after-reboot > mozilla-b2g:master Hi Marshall, This is to save out the metrics periodically so that we are guarded against a reboot in between the transmissions. It includes merging the payloads of the old and new and then saving it to asyncStorage. Thanks, -tamara
Attachment #8657335 - Flags: review?(marshall)
Comment on attachment 8657335 [details] [gaia] tamarahills:bugfix/1176986-persist-metrics-after-reboot > mozilla-b2g:master I left a comment about an empty callback function that should be addressed before landing, but other than it looks good to go
Attachment #8657335 - Flags: review?(marshall) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: