Include `installation.first_seen` event details in `new_profile` ping on Windows
Categories
(Firefox :: Installer, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox128 | --- | fixed |
People
(Reporter: nalexander, Assigned: nipunshukla002)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fidedi-attribution])
Attachments
(3 files)
Right now, I can find installation.first_seen
events for only about half of the new_profile
pings that I see on Windows: query. This ticket tracks including this valuable information in our new_profile
pings, helping us trace installation through to new profile creation.
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Max and I looked into this a few days ago and it's more complicated than I realized.
- there is support for scalars in the
new-profile
ping (added in https://bugzilla.mozilla.org/show_bug.cgi?id=1570652), but it doesn't seem to have been used again - the scalar used there is set very early during startup; the scalars in this ticket would need to block the ping
- perhaps the best approach is to kick off a promise for them when scheduling the ping (https://searchfox.org/mozilla-central/rev/edccfac5746704da49c1551aed8b79f57003bd68/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs#1215) and await that promise before sending the ping (https://searchfox.org/mozilla-central/rev/edccfac5746704da49c1551aed8b79f57003bd68/toolkit/components/telemetry/app/TelemetryControllerParent.sys.mjs#1237)
- it's not clear that the new-profile ping testing would work unaltered
- but maybe these details should be cached and added to the environment? Generally we're trying to avoid adding to the environment.
- extracting the functionality from https://searchfox.org/mozilla-central/rev/edccfac5746704da49c1551aed8b79f57003bd68/browser/modules/BrowserUsageTelemetry.jsm#1244 into an async collection method for re-use shouldn't be hard.
- we'd also need to add quite a few scalars since we can't include arbitrary objects, AFAIK. (But maybe we can? That would be convenient.)
:chutten, can you advise on whether adding such scalars to this ping is acceptable? If it is, can you comment on a good approach to schedule collection before we send the ping? (Or redirect if somebody else is better positioned to advise.)
Thanks!
Comment 2•2 years ago
•
|
||
- I see you've already noticed that Events in Custom Pings isn't something that's supported by Legacy Telemetry (This is not the last time I will recommend you consider Glean for this collection)
- The delay in sending a "new-profile" ping was added to ensure we didn't send something before the user had a chance to opt out of data upload. Now we delete previously-sent data on data upload opt-out, so we can be a little more flexible about things like that.
- "new-profile" ping supporting Scalars means if you shape the new collections as Scalars you don't need to hand-edit the schema to add them. You could add arbitrary JSON... and then write the schema for how that'll work when it hits the pipeline. (Or you can use Glean and take advantage of many fine metrics types (including events))
- You would definitely need to update the tests, if only to add new ones to cover your added instrumentation. (Testing is friendlier with Glean)
- Please don't add anything to the Environment unless you really need them to be included in almost every ping that Legacy Telemetry sends.
- Alas, I'm the only person positioned near Legacy Telemetry just now (Jan-Erik's on PTO, and Alessio's priority is manager things). The ownership of the "new-profile" ping could live with its instrumenting team (but that's Alessio and me as the final survivors there (see bug 1120370) and we're no longer under Firefox, which is where the work request came from)... but anyhoo. It's me.
This collection: it's not a datetime is it? checks Oh, it's a bunch of cool stuff. Why isn't this its own (Glean, obv) Custom Ping? I mean, you'd be starting from scratch for history, but from the sounds of things you're anticipating needing to do that anyway?
Overall, if my oh-so-subtle nudges towards The Better Data Collection System aren't swaying you, then yes: I'd recommend going with Scalars in the "new-profile" ping. I can help consult on any problems you run into on the instrumentation and testing front, but I don't expect your array of Promise
s and scheduling would negatively interact with any existing guarantees. But we'll still want to allocate effort for validating from the data-side after landing that the changes don't interfere with the normal operation of the ping. (Maybe couch them behind a Nimbus feature so we can turn it on/off remotely?)
Updated•2 years ago
|
Comment 3•2 years ago
|
||
Oh, I guess I should sum up what :nalexander and I chatted about yesterday. This is seeming to be a "Scalars in the "new-profile" ping" sort of thing, the change in scheduling to ensure that the first_seen
extras are present could induce some odd changes for "new-profile" pings with reason "shutdown" but nothing I'm worried about, and we should definitely make sure these changes are validated (and I maintain a Nimbus experiment+rollout is a good way to work it).
As always, I'm here to consult if you have any questions.
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
Reporter | ||
Comment 5•2 years ago
|
||
Depends on D176495
Reporter | ||
Comment 6•2 years ago
|
||
Depends on D176496
Reporter | ||
Comment 7•2 years ago
|
||
Max: I applied your work and started fixing up the test, which was tricky because of pre-existing issues that prevented using .only()
. I haven't tried this on Windows and obviously I've not tested the Telemetry events yet, so I'm not sure where the patch stands. But hopefully this is helpful!
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
The following patch is waiting for review from an inactive reviewer:
ID | Title | Author | Reviewer Status |
---|---|---|---|
D176497 | Bug 1811374 - Include installation.first_seen event details in new_profile ping, r=nalexander |
mpohle | nalexander: Back Aug 21, 2023 |
:mpohle, could you please find another reviewer?
For more information, please visit BugBot documentation.
Updated•2 years ago
|
Updated•1 year ago
|
Comment 9•11 months ago
|
||
This is still on my radar, but has not progressed further due to other priorities.
Comment 10•11 months ago
|
||
Wondering if this bug status is still accurate and what can be done to close it.
Comment 11•11 months ago
|
||
+1 on prioritizing it - this will help support unattributed funnel understanding. We need to get installer info to identify the installer type (full/stub/exe/msi) as well as whether it was run silently. These are seen as critical elements to segment our audience when attempting to measure retention.
Updated•9 months ago
|
Assignee | ||
Comment 13•9 months ago
|
||
(In reply to Chris H-C :chutten from comment #2)
- "new-profile" ping supporting Scalars means if you shape the new collections as Scalars you don't need to hand-edit the schema to add them. You could add arbitrary JSON... and then write the schema for how that'll work when it hits the pipeline. (Or you can use Glean and take advantage of many fine metrics types (including events))
Sorry, I don't fully understand how this would work. I'm assuming we want all of the info inside first_seen
, not just installer type and the silent bool. If I'm reading this right we can directly pass in the JSON (as a string I suppose) to one scalar and then deal with deserializing it on the pipeline side. Is that correct?
Assignee | ||
Updated•9 months ago
|
Comment 14•9 months ago
•
|
||
That was a notice that all custom pings in Legacy Telemetry are arbitrary JSON and so adding or changing them is fraught with schema-related peril. Unless, like in the "new-profile" ping, there's been built a section that expects to be expanded, like for its scalars. Then you don't need to worry about changing the schema.
I do not recommend forcing JSON into a probe. (That's what Glean's object
metric type is for. If using Glean is an option you wish to pursue.)
Updated•9 months ago
|
Reporter | ||
Comment 15•9 months ago
|
||
chutten: do we need new-profile
ingestion changes to get the new fields into the relevant tables, or into Looker versions of those tables? Thanks!
Comment 16•9 months ago
|
||
Comment 17•9 months ago
|
||
Backed out for causing xpcshell failures in test_TelemetryController.js
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | toolkit/components/telemetry/tests/unit/test_TelemetryController.js | test_sendNewProfile - [test_sendNewProfile : 94] The ping must have the correct type. - "event" == "new-profile"
Comment 18•9 months ago
|
||
Since these are Scalars in the usual manner there are no schema changes required (if interested, it's because the segment of the ping is expecting metrics). The schema generator knows to ask probe-scraper for scalars recorded in the "main" process into the "new-profile" store to tell bigquery what columns to generate in the table.
...as for Looker, that I'm not as sure about. I'm like 92% confident that the lookml generation will complete successfully and automatically to ensure that the scalar fields are available in explores and looks. If it's not there the same (or, at worst, the next) day that the columns are available in telemetry.new_profile
, then definitely raise that question to Slack#data-help.
Comment 19•9 months ago
|
||
Assignee | ||
Comment 20•9 months ago
|
||
There's a race between which of the "event" and "new-profile" pings is received first within test_TelemetryController.js
, if we get "event" as the first ping, discard it, get the next one, and check that is "new-profile." Also add a flag to not send the failureReason
if we've already sent a new-profile ping in this session.
Assignee | ||
Updated•9 months ago
|
Comment 21•9 months ago
|
||
Comment 22•9 months ago
|
||
Backed out for causing xpcshell failures on test_new_profile.js
Assignee | ||
Comment 23•9 months ago
|
||
Newly added test fails on MSIX due to write restrictions.
Comment 24•9 months ago
|
||
Assignee | ||
Updated•9 months ago
|
Comment 25•9 months ago
|
||
bugherder |
Description
•