openedx / openedx/edx-django-utils
[DEPR]: Code Owner Monitoring
@robrap is already working on this.
Since Jan 23, 2025.
- Dominant language
- Python
- Stars
- 28
- Forks
- 31
- Avg merge
- 7d 6h
- Merged PRs (30d)
- 1
Description
Proposal Date
2024-12-11
Target Ticket Acceptance Date
2024-12-23
Earliest Open edX Named Release Without This Functionality
Teak - 2025-04
Rationale
The code_owner monitoring code in was introduced to help 2U monitor the large monolith (LMS), and attribute different parts of the app to different teams. This DEPR assumes that this is 2U-specific code, and that no other orgs or teams are using this functionality for monitoring purposes.
Slightly related, the New Relic search script was likely only used by 2U. This could be removed if no one is using it.
Removal
What would be removed is https://github.com/openedx/edx-django-utils/tree/master/edx_django_utils/monitoring/internal/code_owner, and all associated code, config, and documentation.
Slightly related, we could also remove the new_relic_search.py script and supporting documentation. There would be no replacement, other than simply making a copy of the script as-needed.
Replacement
- It is possible that no one in the community needs a replacement.
- For 2U, the functionality was replaced by a plugin that adds instrumentation in two ways:
- For Django requests, instrumentation was added to the plugin using new signals that were added to edx-django-utils MonitoringSupportMiddleware, as documented in https://github.com/openedx/edx-django-utils/pull/467.
- For Celery tasks, 2U is using a Datadog span processor to add instrumentation.
For 2U, the span processor replaces the need for the custom decorator that was added to all Open edX celery tasks, and documented in the ADR: 0003-code-owner-for-celery-tasks.
If we choose to remove this decorator, there is no real replacement if your monitoring tool does not have some way to hook into these tasks. New Relic had no such hook in the past.
Deprecation
- It could simply be removed if no one is using it.
- The decorator for celery tasks is slightly more complicated, because it has references throughout the codebase. This might get marked as deprecated before removal.
Migration
No response
Additional Info
If no one is using this except 2U, it could be removed shortly after acceptance, since 2U has nearly completed the migration to a plugin.
Task List
- Remove codeowner code uses (outside edx-django-utils) [do this first]
- See github search of uses
- Remove semgrep linting in edx-platform, used for celery task decorator.
- edx-django-utils changes [remove references above first, then introduce breaking changes.]
-
Add deprecation warning to celery task decorator.(There will be no deprecation warning.) - Ensure removal gets major version bump with breaking changes explained.
- See github search of uses
- https://github.com/openedx/edx-django-utils/pull/547 (start of this work)
- Also remove the new_relic_search script and docs.
-
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.
Assessment
This issue has not been assessed yet.