Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPP-3668 collect domain address telemetry #4323

Merged
merged 9 commits into from
Jan 19, 2024

Conversation

say-yawn
Copy link
Contributor

New feature description

Collect domain address telemetry for:

  • Total number of domain mask created
  • Total number of domain mask created from email flow
  • Total number of domain mask failed to get created from email flow
    Optionally collect data on number of deleted addresses per user

Checklist (Definition of Done)

  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) to match changes made during the development process.
  • I've added or updated relevant docs in the docs/ directory
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.
  • Commits in this PR are minimal and have descriptive commit messages.

Copy link
Member

@jwhitlock jwhitlock left a comment

Choose a reason for hiding this comment

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

Thanks @say-yawn, this looks good to me, and the functions you moved feel like they belong in their new homes. A few nits, and merge when ready.

domain_address = DomainAddress.objects.create(
user=user_profile.user,
address=address,
user=user_profile.user, address=address, first_emailed_at=first_emailed_at
Copy link
Member

Choose a reason for hiding this comment

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

Nice update!

@@ -334,6 +334,43 @@ def test_delete_mozmail_deleted_address_object(self):
deleted_count = DeletedAddress.objects.filter(address_hash=address_hash).count()
assert deleted_count == 1

def test_delete_increments_values_on_profile(self):
Copy link
Member

Choose a reason for hiding this comment

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

😍 tests!

emails/models.py Outdated Show resolved Hide resolved
@@ -314,6 +315,30 @@ def switch_link(key, value):
return HttpResponse(wrapped_email)


def _store_reply_record(
Copy link
Member

Choose a reason for hiding this comment

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

👍 better here with the rest of the email processing code. Someday, I'll move it all to emails/processing.py or similar...

"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"num_deleted_relay_addresses" integer unsigned NOT NULL CHECK (
"num_deleted_relay_addresses" >= 0
) DEFAULT 0,
Copy link
Member

Choose a reason for hiding this comment

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

👍 GOT EM

@say-yawn say-yawn added this pull request to the merge queue Jan 19, 2024
Merged via the queue into main with commit 6c97fc2 Jan 19, 2024
25 checks passed
@say-yawn say-yawn deleted the MPP-3668-Collect-domain-address-telemetry branch January 19, 2024 20:45
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