Investigate differences between legacy telemetry and modern instrumentation of addon manage events
Categories
(Toolkit :: Add-ons Manager, task, P1)
Tracking
()
People
(Reporter: chutten, Assigned: chutten)
References
Details
https://sql.telemetry.mozilla.org/queries/109870/source?p_min_major_version=141 shows discrepancies between addonsManager.{enable|disable|sideload_prompt|uninstall}.extension events in telemetry.events and the Glean addons_manager.{enable|disable|sideload_prompt|uninstall}_extension events in firefox_desktop.event_stream that mirror to them.
The Glean mirroring events have very good agreement with the older Glean addons_manager.manage events in firefox_desktop.event_stream.
This bug is about figuring out why this might be.
| Assignee | ||
Comment 1•1 year ago
|
||
My first impression is that the Glean addons_manager.{enable|disable|sideload_prompt|uninstall}_extension events are received with much greater frequency than the mirrored Legacy addonsManager.{enable|disable|sideload_prompt|uninstall}.extension events over a given one-day period (I chose Aug 14).
Now, we don't expect these to line up exactly. The schedule and behaviour of the Legacy "event" ping is different from the schedule and behaviour of the Glean "events" ping:
* Legacy will send on app shutdown ("profile-before-change"), after an hour, or after hitting 1000 events
* Glean will send on app start, user inactivity, or after hitting 500 events
This would reasonably lead to
- More Glean "events" pings from chatty users (hitting 500 event limit before 1000)
- No dropped events due to oversautation because Glean doesn't drop events when its limit is reached (Legacy Telemetry reports that it drops some tens of millions of events each day)
- More complete coverage of events during shutdown (Glean will continue accepting events until
XPCOMShutdown/xpcom-shutdownvs Telemetry'sAppShutdown/profile-before-change)- I also note that Legacy will silently drop any events recorded before
TelemetryEvent::InitializeGlobalStatewhich is called at the time we create theTelemetryImplinstance which happens the first time someone gets the service (e.g. via aServices.telemetrycall in JS orGetService()in C++). I don't actually know how early that happens, so there may or may not be more complete coverage of events from Glean than Legacy during startup as well (since Glean accepts events into the preinit queue as early as you'd like).
- I also note that Legacy will silently drop any events recorded before
So I guess it's not unexpected that the Glean events would be received much more frequently than the mirrored-to Legacy events.
But note that I said that the Glean values were much higher than the Legacy values, but the motivating query showed that for Fx141+ the reverse was actually true in many cases (app-builtin, app-system-user, winreg-app-global, and winreg-app-user), though the magnitude of these differences is very low. What's going on there?
In short: I don't know. It is impossible for an event to be recorded successfully to Legacy without Glean getting a chance to record it. Glean'll only refuse to record an event due to invalid_overflow (event extra value > 500B) or invalid_value (event extra key not defined). According to our monitoring, no addons_manager metrics are experiencing either of those problems.
My assumption is that this is because Legacy Telemetry fires off an "event" ping at shutdown and Glean does not (though it was configured to be able to be experimented with in bug 1837233) meaning that events near shutdown will always be received first in the Legacy record because of its at-shutdown ping schedule. And until the user starts up Firefox again (if they do) there will be events in the Legacy record that aren't in the Glean record, despite both having been recorded on the client within millis of each other.
The next steps here will be to see if the volume difference in Fx141+ holds true over different time periods and split by channel and so forth (maybe the 29 days ending Aug 12 was just an unlucky window? Maybe there's an abundance of "beta" and "nightly" nudging the numbers?).
| Assignee | ||
Comment 2•1 year ago
|
||
I've filed bug 1983602 for the whole "Legacy Telemetry is dropping a lot of events, what should we do about that" investigation and discussion. Not sure how much I'll be able to do further here given that over 1% of all Legacy events aren't making it off the client (and we don't know their distribution), but I'll give it a closer look.
| Assignee | ||
Comment 3•1 year ago
|
||
We are as confident as we can be under the circumstances that the differences in data are due to differences in reporting between the two eventing systems, and not due to any unknown fault. Legacy Telemetry just optimizes for a set volume of events through client-side throttling, and Glean optimizes for data quality with post hoc protections offered through Server Knobs.
All clear here.
Description
•