Repository navigation
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 feat: add monitoring signals for plugins #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
- chore: Remove deprecated code owner utilities and related tests #547 (start of this work)
- Also remove the new_relic_search script and docs.
-
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsBreaking Changes Unblocked
Activity
robrap commentedon Dec 11, 2024
Announced here: https://discuss.openedx.org/t/deprecation-removal-code-owner-monitoring-edx-django-utils-469/14554
dianakhuang commentedon Jan 8, 2026
A team at 2U has this on backlog, but it's low priority.
rahulkanneri-2u commentedon Sep 1, 2026
@robrap
Status update:
Could someone with edit access update the task list above to point at #551 and #39047?
chore: remove set_code_owner_attribute decorator from Celery tasks (#…
rahulkanneri-2u commentedon Sep 11, 2026
Progress update:
openedx-platform (Celery
set_code_owner_attributedecorator removal):0001-monitoring-by-code-owner.rstADR (accidentally deleted in #39047) with its Status updated to Superseded, pointing back to this issue.edx-django-utils (non-celery code owner monitoring cleanup):
CodeOwnerMonitoringMiddlewareis a breaking change for downstream consumers. Doing this safely would require adding deprecation warnings first (and updating the changelog), which we're intentionally not taking on right now to keep this timeboxed. The celery decorator (set_code_owner_attribute) and its helpers inutils.pyare left in place as still-in-use and out of scope for now.robrap commentedon Sep 11, 2026
@feanil @kdmccormick: This is back on hold.
feanil commentedon Sep 16, 2026
Given that no one is using this, I'm fine with it getting dropped via a major version bump when someone can get back to it. It can move directly to "Breaking changes unblocked" at that point.
robrap commentedon Sep 16, 2026
Thanks @feanil. I clarified the task list.
And if 2U is ever able to do this work, we also need to clean-up these 2U search results.