Skip to content

fix(glean): Add missing 2FA Glean events#18345

Merged
vpomerleau merged 1 commit intomainfrom
FXA-11087
Feb 12, 2025
Merged

fix(glean): Add missing 2FA Glean events#18345
vpomerleau merged 1 commit intomainfrom
FXA-11087

Conversation

@vpomerleau
Copy link
Copy Markdown
Contributor

@vpomerleau vpomerleau commented Feb 10, 2025

Because

  • We want full metrics coverage for the 2FA flows before rolling out recovery phone

This pull request

  • Add missing Glean custom events (with reason codes where applicable), automated click events (with type code where applicable), backend events for 2FA setup and disabling, backup authentication code replacement, recovery phone setup and use

Issue that this pull request solves

Closes: #FXA-11087

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

See original ticket for link to glean event audit. New and corrected events are marked as "in progress"

@vpomerleau vpomerleau requested a review from a team as a code owner February 10, 2025 23:34
@vpomerleau vpomerleau marked this pull request as draft February 10, 2025 23:59
@vpomerleau vpomerleau changed the title fix(glean): Add missing 2FA Glean events DRAFT fix(glean): Add missing 2FA Glean events Feb 10, 2025
Because:

* We want full metrics coverage for the 2FA flows before rolling out recovery phone

This commit:

* Add missing 2FA setup custom events, automated click events, and reason codes (ensure events have reason codes for setup from settings, inline or to replace codes)

Closes #FXA-11087
@vpomerleau vpomerleau changed the title DRAFT fix(glean): Add missing 2FA Glean events fix(glean): Add missing 2FA Glean events Feb 11, 2025
@vpomerleau vpomerleau marked this pull request as ready for review February 11, 2025 20:47
Copy link
Copy Markdown
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vpomerleau Thanks for doing the metrics audit and adding missing metrics!

*
* Generated from `account_banner.reactivation_success_view`.
*/
export const reactivationSuccessView = new EventMetricType(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought these got generated automatically, this is unrelated to the PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to manually run glean-generate for a few packages, and maybe it hadn't been done for content-server in a while?

});

expect(alertBar.success).toHaveBeenCalledWith('Recovery phone removed');
expect(alertBar.success).toHaveBeenCalledWith(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I missed these when implementing the remove phone part.

'Recovery phone removed'
)
),
gleanSuccessView
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Does not look like alertBar takes a glean metric.

}

success(message: string) {
success(message: string, gleanEvent?: () => void) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine, but I think might be nice to have a setMetric property that gets called on this.show. Maybe a follow up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, will file a follow up for this!

@vpomerleau vpomerleau merged commit 281563c into main Feb 12, 2025
@vpomerleau vpomerleau deleted the FXA-11087 branch February 12, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants