edx-django-utils
edx-django-utils copied to clipboard
Feat add dd and otel celery tasks
Description:
Adds an initialize_celery_monitoring util to allow celery tasks to be monitored by the Open Telemetry and Datadog providers. edx-platform PR to follow.
JIRA:
https://github.com/edx/edx-arch-experiments/issues/584
Testing instructions:
- Set this package to be installed locally, check out this PR
-
- Run your edx-platform off this branch: https://github.com/openedx/edx-platform/pull/34673 to use the implementation required from the package.
- set your OPENEDX_TELEMETRY django setting to be [
edx_django_utils.monitoring.DataDogBackend] - follow https://2u-internal.atlassian.net/wiki/spaces/~840928901/pages/813793298/OpenTelemetry+New+Relic+and+Datadog for devstack setup for DD, but set up the DD agent on CMS, not lms
- Follow https://2u-internal.atlassian.net/wiki/spaces/ENGAGE/pages/395673715/How+to+configure+Celery+worker+on+LMS+CMS+Devstack to set up celery workers on cms.
- Export a course
- View the export on DD with a celery task
Reviewers:
- [ ] tag reviewer
Merge checklist:
- [ ] All reviewers approved
- [x] CI build is green
- [x] Version bumped
- [x] Changelog record added
- [x] Documentation updated (not only docstrings)
- [ ] Commits are squashed
Post merge:
- [ ] Create a tag
- [ ] Check new version is pushed to PyPi after tag-triggered build is finished.
- [ ] Delete working branch (if not needed anymore)
Author concerns:
List any concerns about this PR - inelegant solutions, hacks, quick-and-dirty implementations, concerns about migrations, etc.
Based on Tim's comment, I went and looked into if we were getting what we needed from celery by default.
To do that, I looked at the logs over the past month.
Do the logs related to celery increase or decrease in volume when we enabled DD in edx-platform? The answer is it increased in volume from april 22-27rd, which was the window for edx-platform having celery on in dd. I have been really struggling to explain why that is the case, however, given the code that enables the patch by default. Either way, I'm making improvements to the code and we should maybe plan on needing it.
@timmc-edx: FYI: I'm closing this PR. I assume at this point we do not need this.