Closed Bug 1675310 Opened 4 years ago Closed 4 years ago

telemetry::RecordEvent cannot be called during startup off the main thread

Categories

(Toolkit :: Telemetry, defect, P1)

defect
Points:
1

Tracking

()

RESOLVED FIXED
84 Branch
Tracking Status
firefox84 --- fixed

People

(Reporter: sg, Assigned: chutten)

References

Details

Attachments

(1 file)

telemetry::RecordEvent cannot be safely called during early startup off the main thread, because then it might call Preferences::GetBool off the main thread to initialize its local statics.

We hit this when trying to add telemetry recording during early startup in Bug 1665088.

Component: Storage: Quota Manager → Telemetry
Product: Core → Toolkit

Do you mean this one? If so, we can probably get rid of it. It was an off switch to move back to sending events in the "main" ping in case the "event" ping didn't work out.

Flags: needinfo?(sgiesecke)

The default value has proven acceptable these past years, so we can probably de-pref it too.

Assignee: nobody → chutten
Severity: -- → S3
Status: NEW → ASSIGNED
Points: --- → 1
Flags: needinfo?(chutten)
Priority: -- → P1

Recording events involved asking whether they should go in the event ping or
not, and also whether we hit the limit for how many are allowed in a ping.
These values are stored in prefs which aren't terribly accessible off the main
thread, even if the event recording is.

Both of these prefs have been set in stone in their default values for over two
years now, so we can safely remove them and their scaffolding. Huzzah!

Sounds good. Thanks for taking care of this so quickly!

Pushed by chutten@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d1443dd277ee
Remove enabled and limit prefs for the event ping r=janerik
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Unfortunately, I just noticed there's another preference: Preferences::GetUint("toolkit.telemetry.maxEventSummaryKeys", 500); Can this be eliminated as well?

Flags: needinfo?(chutten)
Blocks: 1676404

It sure can. Let's give it its own bug (bug 1676404) so I don't confuse the tools by adding new patches to this one.

Flags: needinfo?(chutten)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: