Closed Bug 2041497 Opened 3 months ago Closed 3 months ago

write_in_microsurvey ping instructions are being forwarded in a clunky way

Categories

(Firefox :: Messaging System, enhancement)

enhancement
Points:
3

Tracking

()

RESOLVED FIXED
153 Branch
Tracking Status
firefox151 --- wontfix
firefox152 --- fixed
firefox153 --- fixed

People

(Reporter: aminomancer, Assigned: aminomancer)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [omc])

Attachments

(2 files, 1 obsolete file)

The way we decide whether to record messaging system metrics on the messaging-system ping or the microsurvey ping involves reading the message's write_in_microsurvey property. Right now, that property is being read by the React component and passed all the way through the nested components, where it gets added to the new telemetry event's event_context, which is passed to MultiStageUtils.sendEventTelemetry(), ultimately reaching AboutWelcomeTelemetry.sendTelemetry, which processes it and decides to record the metrics on microsurvey as a result.

This is a pretty clunky and inefficient way of doing things. It didn't occur to me at the time that we could bypass React entirely. The surface code that instantiates the React component is aware of the message definition - it's what is passing the message to the React component via AWGetFeatureConfig(). Likewise, it is what provides the AWSendEventTelemetry method. So it can easily check the write_in_microsurvey property within AWSendEventTelemetry, and insert it into the event_context when applicable. That minimizes the amount of processing for the property.

Stop passing write_in_microsurvey from AWGetFeatureConfig to the
AWSendEventTelemetry call. Instead, the surface that provides the
AWSendEventTelemetry method will just insert it in the method
definition and pass it straight to AboutWelcomeTelemetry. This means
the React component does not have to be aware of the property at all.

Assignee: nobody → shughes
Status: NEW → ASSIGNED
Pushed by smolnar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/9fc89ff94a58 https://hg.mozilla.org/integration/autoland/rev/0cfba7541c69 Revert "Bug 2041497 - Refactor write_in_microsurvey ping determination. r=omc-reviewers,andhuang" for causing bc failures @ browser_aiwindow_smartbar_telemetry
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 153 Branch

Stop passing write_in_microsurvey from AWGetFeatureConfig to the
AWSendEventTelemetry call. Instead, the surface that provides the
AWSendEventTelemetry method will just insert it in the method
definition and pass it straight to AboutWelcomeTelemetry. This means
the React component does not have to be aware of the property at all.

Original Revision: https://phabricator.services.mozilla.com/D301946

Attachment #9589434 - Flags: approval-mozilla-beta?
Flags: needinfo?(shughes)

:aminomancer, the uplift request is missing an uplift request form
https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift#Submit_the_Uplift_Request_Form

Flags: needinfo?(shughes)

nvm I see it's part of a stack

Flags: needinfo?(shughes)

Stop passing write_in_microsurvey from AWGetFeatureConfig to the
AWSendEventTelemetry call. Instead, the surface that provides the
AWSendEventTelemetry method will just insert it in the method
definition and pass it straight to AboutWelcomeTelemetry. This means
the React component does not have to be aware of the property at all.

Original Revision: https://phabricator.services.mozilla.com/D301946

Attachment #9589511 - Flags: approval-mozilla-release?
Flags: in-testsuite+
Attachment #9589434 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9589511 - Flags: approval-mozilla-release? → approval-mozilla-release+

Backed out of release, since Bug 2036193 had to be backout due to CI failures

Attachment #9589511 - Flags: approval-mozilla-release+ → approval-mozilla-release?
Attachment #9589511 - Flags: approval-mozilla-release? → approval-mozilla-release+
Attachment #9589511 - Attachment is obsolete: true
QA Whiteboard: [qa-triage-done-c153/b152]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: