Commit da5a8b55 by David Ormsbee

New Relic metric: Enrolled courses on dashboard.

This is so we can better map how student dashboard performance maps to
number of enrolled courses.
parent 70496204
......@@ -118,6 +118,8 @@ from openedx.core.djangoapps.embargo import api as embargo_api
import analytics
from eventtracking import tracker
import newrelic_custom_metrics
# Note that this lives in LMS, so this dependency should be refactored.
from notification_prefs.views import enable_notifications
......@@ -615,6 +617,10 @@ def dashboard(request):
# enrollments, because it could have been a data push snafu.
course_enrollments = list(get_course_enrollments(user, course_org_filter, org_filter_out_set))
# Record how many courses there are so that we can get a better
# understanding of usage patterns on prod.
newrelic_custom_metrics.accumulate('num_courses', len(course_enrollments))
# sort the enrollment pairs by the enrollment date
course_enrollments.sort(key=lambda x: x.created, reverse=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment