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

refactor: remove PII from log messages in programs tasks #35623

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justinhynes
Copy link
Contributor

Description

[APER-3723]

Refactors a number of log statements from the Celery tasks in the Programs Django app. This removes username from the log statements and opts to use the LMS User ID instead.

Comment on lines -406 to +408
LOGGER.warning(f"User {student} is not eligible for any new program certificates")
LOGGER.warning(f"User {student.id} is not eligible for any new program certificates")

LOGGER.info(f"Successfully completed the task award_program_certificates for user {student}")
LOGGER.info(f"Successfully completed the task award_program_certificates for user {student.id}")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about changing these to debug statements, or even removing them, but was trying to be wary about making too many changes.

These log statements come from a time when we had a lot less visibility/understanding of all of our edxapp-to-credentials communication issues, but seem like they are less useful or awfully noisy now.

Comment on lines -714 to +716
LOGGER.info(f"No program certificates to revoke from user {student}")
LOGGER.info(f"No program certificates to revoke from user {student.id}")

LOGGER.info(f"Successfully completed the task revoke_program_certificates for user {student}")
LOGGER.info(f"Successfully completed the task revoke_program_certificates for user {student.id}")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had the same thoughts here as above...

[APER-3723]

Refactors a number of log statements from the Celery tasks in the Programs Django app. This removes username (considered PII) from the log statements and opts to use LMS User ID instead.
@justinhynes justinhynes force-pushed the jhynes/APER-3723_remove-pii-from-log branch from bc11f5a to f84cb48 Compare October 9, 2024 17:59
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.

1 participant