feat: added channel field in ace sentl event (#35423)

This commit is contained in:
Muhammad Adeel Tajamul
2024-09-05 22:20:53 -07:00
committed by GitHub
parent ec76baf15f
commit 0d69c01abc

View File

@@ -44,10 +44,15 @@ def ace_email_sent_handler(sender, **kwargs):
course_id = message.context.get('course_id')
if not course_id:
course_id = course_email.course_id if course_email else None
try:
channel = sender.__class__.__name__
except AttributeError:
channel = 'Other'
tracker.emit(
'edx.bulk_email.sent',
'edx.ace.message_sent',
{
'message_type': message.name,
'channel': channel,
'course_id': course_id,
'user_id': user_id,
}