openedx / openedx/openedx-platform
[LTI Provider] Improve logging in send_composite_outcome Celery task
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Problem
The send_composite_outcome Celery task currently produces minimal log output. On success, only the generic Celery trace log is emitted — no context about what grade was sent, to whom, or for which user/course/assignment.
Current log output (on success):
Task lms.djangoapps.lti_provider.tasks.send_composite_outcome[<task-id>] succeeded in 2.3s: None
This makes it difficult to:
- Confirm which grade value was actually sent to the LTI consumer
- Identify which user or course/assignment was involved
- Diagnose failures without external timestamps (e.g., checking Canvas directly)
Suggested Improvements
Add structured log statements inside send_composite_outcome (and related tasks) that include:
- User identifier — whose grade is being sent (user ID or anonymized ID)
- Course and usage key — which course/assignment triggered the passback
- Grade value — the score being submitted (e.g.,
0.85) - LTI outcome URL — the endpoint on the consumer side receiving the grade
- Result on failure — HTTP status code, response body, or exception detail
Expected Benefit
Operators and support teams can confirm grade passback without needing Canvas-side investigation. Failures become immediately diagnosable from logs alone.
Files Likely Involved
lms/djangoapps/lti_provider/tasks.pylms/djangoapps/lti_provider/outcomes.py
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lms/djangoapps/lti_provider/tasks.py at send_composite_outcome, then read lms/djangoapps/lti_provider/outcomes.py to trace the grade passback and related tasks. Done means successful and failed submissions emit structured logs containing the requested user, course/usage key, grade, outcome URL, and failure details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, observability
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100