v3.5.0: feat: Robustness improvements to datadog_diagnostics plugin (#723)
Latest
- Add `DATADOG_DIAGNOSTICS_ENABLE` for quick disable if needed
- Limit spans with `DATADOG_DIAGNOSTICS_MAX_SPANS` (default 100)
- Fix scope of member variables
- Add unit tests
Manual testing:
- Modify `common.djangoapps.student.views.dashboard.student_dashboard` in
edx-platform to call `import time; time.sleep(10)` at the start of the
view.
- Start server and log
- Visit /dashboard
- While the browser is waiting, quickly make a small edit to an
edx-platform file, causing an autoreload.
- Confirm that spans are logged.