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

Log a message whenever an email is sent #9288

Open
seanh opened this issue Jan 28, 2025 · 0 comments
Open

Log a message whenever an email is sent #9288

seanh opened this issue Jan 28, 2025 · 0 comments
Assignees

Comments

@seanh
Copy link
Contributor

seanh commented Jan 28, 2025

Log a thoughtfully-designed message whenever an email is sent. This will enable us to use the logs (in Papertrail) as one way to monitor (and set alerts for) our email-based features.

The log message should not include any potentially sensitive information like: usernames or userids, email addresses, the contents of annotations, or the subject lines or bodies of emails.

The log message should include helpful information like the type of email being sent (identified by the tag, see: #9286), the user.id of the sender (when an email has a "sender": for example in the case of a reply-notification email the sender would be the creator of the reply annotation), the user.id of the recipient, the annotation.id when applicable (for example reply-notification and mention-notification emails have an annotation), etc.

Since the details to be logged will vary depending on the type of email, the generic email send() method should probably have a log_data dict where the caller can supply custom data to be appended to the log message.

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

No branches or pull requests

2 participants