Open Bug 1997195 Opened 1 year ago Updated 18 days ago

Migrate Legacy Telemetry Custom Ping "uninstall" to Glean

Categories

(Toolkit :: Telemetry, task, P1)

task

Tracking

()

ASSIGNED

People

(Reporter: chutten, Assigned: chutten, NeedInfo)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fog-migration])

The "uninstall" ping is very strange. It is saved to a known location on disk with a specific name on every Legacy Telemetry init. It is uploaded in the uninstaller on Windows only.

This bug is about seeing what we should do about this ping. As it stands there's not really a way to duplicate this with Glean (at least not without devious hacks of questionable morals). The uninstaller is just a script that probably can't embed the Glean SDK itself, and the Glean SDK does not store to disk a ping payload in a format you could just post to a URL in the manner that the uninstaller presently attempts with the Legacy ping.

(( After asking on Slack#desktop-integrations, Chris DuPuis offered to accept my ni? ))

  1. Is this data used? Is it useful?
  2. If it is, how important is it that it be migrated exactly? Have there been any advances in uninstall flow that would make using Glean easier?
  3. If NSIS scripts are all we have and a one-shot attempt on Windows only is worth the effort -- what's the preferred way to get payload and header information to the uninstaller script so it could be posted to a known location?
Flags: needinfo?(cdupuis)
Whiteboard: [fog migration] → [fog-migration]

Upon talking with :Mossop at the Engineering Summit, we've ascertained that this ping's not unlike the "downgrade" ping whose migration is considered in bug 1967797. They are both payloads that are created by Firefox code ("downgrade" uses rapidjson, "uninstall" uses Legacy Telemetry) that rely on external mechanisms to be submitted ("downgrade" uses pingsender, "uninstall" uses uninstaller.nsi).

What I don't recall is if we determined whether this ping is actually useful. It's Windows-only and might not have the best data quality (only one attempted submission, does not have access to Firefox's network config instead relying on whatever the OS is using).

But maybe neither of those things matter, because the ping's data are used despite those limitations.

If this mechanism of data collection should continue to be used, then I think we migrate the ping with minimal change. It can contain the same contents and schedule, but be moved closer to the uninstaller itself and cease using Legacy Telemetry for ping assembly and file writing.

If this mechanism of data collection is too flawed to be used, then we can remove it entirely and communicate to its users that it's going away.

Flags: needinfo?(cdupuis) → needinfo?(dtownsend)
See Also: → 1967797

(In reply to Chris H-C :chutten from comment #2)

Upon talking with :Mossop at the Engineering Summit, we've ascertained that this ping's not unlike the "downgrade" ping whose migration is considered in bug 1967797. They are both payloads that are created by Firefox code ("downgrade" uses rapidjson, "uninstall" uses Legacy Telemetry) that rely on external mechanisms to be submitted ("downgrade" uses pingsender, "uninstall" uses uninstaller.nsi).

What I don't recall is if we determined whether this ping is actually useful. It's Windows-only and might not have the best data quality (only one attempted submission, does not have access to Firefox's network config instead relying on whatever the OS is using).

I think I said I had no particular use for it but was unsure about others. Stephen and yannis have taken over ownership of the uninstaller so let's see what they think.

Flags: needinfo?(dtownsend) → needinfo?(spohl.mozilla.bugs)

(In reply to Dave Townsend [:mossop] from comment #3)

Stephen and yannis have taken over ownership of the uninstaller so let's see what they think.

It looks like this data is still very much in use, so I don't think we can simply remove it. The query from comment 2 currently finds a number of recent queries against telemetry.uninstall, including experiment guardrails (some of them scheduled), release uninstall monitoring and our own analyses. As far as I can tell, this ping is the only signal we have that a client uninstalled, and the clientId is what lets it be joined with the rest of a client's data.

So I'd lean towards migrating it with as little change as possible, as Chris suggested in comment 2. I can think of two ways to do that:

  1. Firefox keeps writing the ping to disk on startup, but builds it without Legacy Telemetry and in a format the uninstaller can post as is. This is the closest to what we do today.
  2. The uninstaller runs a Firefox background task before it removes any files, and that task submits a regular Glean uninstall ping. The profile's client ID and profile group ID would have to be included as metrics so the data can still be joined, similar to what the background update task does.

:chutten, which of these (or something else entirely) would work best from the Glean side? If 1 is possible, how would Firefox get a payload and URL that the uninstaller could post without the Glean SDK?

Flags: needinfo?(spohl.mozilla.bugs) → needinfo?(chutten)

Option 1 is possible through, like "downgrade" ping's implementation, inline JSON manipulation. We'd probably fill out UninstallPing.sys.mjs with all the necessary bells and whistles of collating all the information from far-flung modules, manually slotting them into the correct places in the schema, and then saving it to disk. It would also take on responsibility for clearing the payload from disk and resaving it on changes to the data upload preference. From disk onwards nothing changes relative to today's impl: the payload gets picked up by uninstaller.nsi and delivered to incoming.tmo and so forth. Ideally the impl would live somewhere other than t/c/telemetry, but I don't know where install+uninstall support code lives in Firefox (browser/components/attribution? Maybe?)

Option 2 is one that I ought to have considered, but didn't in my quest to cull scope. We'd still have some work to do in figuring out exactly what information we want besides just the ids to include in such a ping that wouldn't be available to the bg task itself (but we'll be doing that sort of thing for Option 1 anyway as we end up reimplementing pieces of the Telemetry Environment). It would be a clean break from telemetry.uninstall, with pings going to firefox_desktop.uninstall instead, so all analyses would know that a change happened (and require migration). But it affords us the opportunity to craft our instrumentation specifically to support analyses we want, instead of kitchen-sink-ing it.

I think I'm still leaning towards Option 1 to keep the scope down to just client-side changes. But I could be convinced otherwise if you uninstaller folks have motivation in another direction?

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