Closed Bug 1137139 Opened 10 years ago Closed 10 years ago

Save main ping with "shutdown" reason when Telemetry shuts down

Categories

(Toolkit :: Telemetry, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: gfritzsche, Assigned: Dexter)

References

Details

Attachments

(1 file, 2 obsolete files)

We currently only trigger "saved-session", we also need to store a (subsession) main ping with reason "shutdown". Note: We only want do this on desktop for now.
Attached patch bug1137139.patch (obsolete) (deleted) — Splinter Review
This patch saves a session ping with the reason "shutdown" when Firefox shuts down, only on Desktop. Adjusts the test_TelemetrySession.js accordingly.
Attachment #8569815 - Flags: review?(gfritzsche)
Attachment #8569815 - Flags: review?(gfritzsche)
Attached patch bug1137139.patch - v2 (obsolete) (deleted) — Splinter Review
Improved test coverage.
Attachment #8569815 - Attachment is obsolete: true
Attachment #8569838 - Flags: review?(gfritzsche)
Attachment #8569838 - Flags: review?(gfritzsche) → review?(vdjeric)
Comment on attachment 8569838 [details] [diff] [review] bug1137139.patch - v2 Review of attachment 8569838 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/telemetry/TelemetrySession.jsm @@ +1248,3 @@ > }; > + > + let savePending = () => TelemetryPing.savePendingPings(getPingType(savedSessionPayload), make savePending a method in the Impl object and call it saveClassicPing or something similar @@ +1249,5 @@ > + > + let savePending = () => TelemetryPing.savePendingPings(getPingType(savedSessionPayload), > + savedSessionPayload, options); > +#ifndef MOZ_WIDGET_ANDROID > + let shutdownPayload = this.getSessionPayload(REASON_SHUTDOWN, false); is there a reason for clearSubsession = false here?
Attachment #8569838 - Flags: review?(vdjeric) → review+
I assumed we didn't need a new subsession when shutting down, as we are creating a new one when starting Firefox again (and the "saved-session" ping isn't clearing the subsession either). Should I create a new subsession for saving the "shutdown" ping?
Flags: needinfo?(vdjeric)
Attached patch bug1137139.patch - v3 (deleted) — Splinter Review
This patch adds a |savePendingPingsClassic| function. As discussed over IRC, subsessions should not be created when saving shutdown pings. Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=58341471c0d9
Attachment #8569838 - Attachment is obsolete: true
Flags: needinfo?(vdjeric)
Attachment #8572745 - Flags: review+
Keywords: checkin-needed
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: