Telemetry shouldn't attempt to send network requests during shutdown
Categories
(Toolkit :: Telemetry, defect, P3)
Tracking
()
People
(Reporter: florian, Unassigned)
Details
Comment 1•6 years ago
|
||
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
The profile shows a session of length 6s which means delayed init likely didn't complete until after profile-change-net-teardown which means the observer was likely not added until after the topic was notified.
This is a common problem for Telemetry in short (under 2min) sessions and I don't think we have a plan for better handling that at this time.
Reporter | ||
Comment 4•6 years ago
|
||
(In reply to Chris H-C :chutten from comment #3)
The profile shows a session of length 6s which means delayed init likely didn't complete until after profile-change-net-teardown which means the observer was likely not added until after the topic was notified.
I don't understand this. If the observer wasn't added, why are we sending network requests at all, rather than dropping everything on the floor?
This is a common problem for Telemetry in short (under 2min) sessions
If this is indeed a common problem, then it sounds like wontfix is really not the best option. Is there a way to address the common problem more generally so that Telemetry doesn't have unexpected behaviors for short lived sessions?
Comment 5•6 years ago
|
||
... actually, maybe I'm wrong here. _sendingEnabled should be false until the observer has been registered, which means canSendNow
is false which means any ping that is submitted should be saved to disk instead of triggered to be sent.
Maybe this requires more investigation.
Updated•6 years ago
|
Reporter | ||
Comment 6•6 years ago
|
||
If you need a simple way to return early when some JS code is running during shutdown, you can use Services.startup.shuttingDown.
Updated•2 years ago
|
Description
•