-
Notifications
You must be signed in to change notification settings - Fork 108
[MBL-19563][Student] Add retry parameter to Pendo submission analytics #3420
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
Conversation
Add retry tracking to all submission analytics events to distinguish between first-time submission attempts and retry attempts after failures. This allows product managers to accurately analyze submission success rates and understand whether high failure counts include multiple retry attempts from the same submission. ## Changes - Add RETRY constant to AnalyticsParamConstants in canvas-api-2 - Update all 13 submission analytics events in SubmissionWorker to include retry parameter (1 if retryCount > 0, 0 if first attempt) - Leverages existing retryCount field from CreateSubmissionEntity added in MBL-19546 ## Events Updated - SUBMIT_MEDIARECORDING_SUCCEEDED/FAILED (3 events) - SUBMIT_FILEUPLOAD_SUCCEEDED/FAILED (2 events) - SUBMIT_TEXTENTRY_SUCCEEDED/FAILED (2 events) - SUBMIT_URL_SUCCEEDED/FAILED (2 events) - SUBMIT_STUDIO_SUCCEEDED/FAILED (2 events) - SUBMIT_ANNOTATION_SUCCEEDED/FAILED (2 events) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Summary
This PR adds retry tracking to analytics events across submission operations. The implementation is straightforward and adds the RETRY parameter to all submission-related analytics events.
Positive Aspects
✅ Consistent implementation: The retry parameter is added to all relevant analytics events (success and failure cases) across different submission types (media, file upload, text entry, URL, Studio, annotation)
✅ Uses existing infrastructure: Leverages the existing retryCount field from CreateSubmissionEntity (line 49-50)
✅ Proper constant definition: The new RETRY constant is properly added to AnalyticsParamConstants
Issues Found
-
Code duplication (SubmissionWorker.kt:252 and 13 other locations): The same line of code is repeated 14 times throughout the file. Consider extracting to a helper function for better maintainability.
-
Potential data loss (SubmissionWorker.kt:252): The implementation converts the retry count to a binary flag (0 or 1) instead of tracking the actual count. This loses valuable data about whether submissions succeed on retry 1 vs retry 2 vs retry 3. Consider tracking the actual
retryCountvalue or documenting why binary tracking is preferred.
Additional Observations
Test Coverage: No test files were found for SubmissionWorker or analytics tracking. Consider adding tests to verify:
- The retry parameter is correctly set to 0 for first attempts
- The retry parameter is correctly set to 1 for retried submissions
- Analytics events are properly logged for all submission types
Analytics Consistency: All 14 analytics events now consistently include the retry parameter, which is good for data analysis completeness.
The changes are functionally correct but would benefit from the refactoring suggestions to improve code quality and data granularity.
apps/student/src/main/java/com/instructure/student/mobius/common/ui/SubmissionWorker.kt
Show resolved
Hide resolved
apps/student/src/main/java/com/instructure/student/mobius/common/ui/SubmissionWorker.kt
Show resolved
Hide resolved
🧪 Unit Test Results✅ 📱 Student App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Fri, 28 Nov 2025 14:27:25 GMT |
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
Summary
Adds a "Retry" parameter to all Pendo submission tracking events (both SUCCEEDED and FAILED) to distinguish between first-time submission attempts and retry attempts after failures. This enables product managers to accurately analyze submission success rates and understand whether high failure counts include multiple retry attempts from the same user.
Changes
RETRYconstant toAnalyticsParamConstantsin canvas-api-2 librarySubmissionWorkerto include retry parameter:retryCount > 0(retry attempt)retryCount == 0(first attempt)retryCountfield fromCreateSubmissionEntityadded in MBL-19546Events Updated
All submission analytics events now include the retry parameter:
SUBMIT_MEDIARECORDING_SUCCEEDED/FAILED(3 events)SUBMIT_FILEUPLOAD_SUCCEEDED/FAILED(2 events)SUBMIT_TEXTENTRY_SUCCEEDED/FAILED(2 events)SUBMIT_URL_SUCCEEDED/FAILED(2 events)SUBMIT_STUDIO_SUCCEEDED/FAILED(2 events)SUBMIT_ANNOTATION_SUCCEEDED/FAILED(2 events)Test Plan
Manual Testing
retry: 0retry: 1in the Pendo analytics eventVerification
retry: 0retry: 1refs: MBL-19563
affects: Student
release note: Improved analytics tracking for submission attempts to better distinguish between first attempts and retries
🤖 Generated with Claude Code