Skip to content

[DEPR]: Code Owner Monitoring #469

Open
Open

Description

@robrap

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:
    1. 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.
    2. 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

Activity

  1. added
    deprProposal for deprecation & removal per OEP-21
    on Dec 10, 2024
  2. moved this from Proposed to Communicated in DEPR: Deprecation & Removalon Dec 11, 2024
  3. moved this to Backlog in Arch-BOMon Dec 12, 2024
  4. moved this from Communicated to Accepted in DEPR: Deprecation & Removalon Jan 23, 2025
  5. moved this from Accepted to Removal Pending in DEPR: Deprecation & Removalon Jan 23, 2025
  6. moved this from Todo to Backlog in Arbi-BOMon Jun 16, 2025
  7. dianakhuang commented on Jan 8, 2026

    @dianakhuang
    Contributor

    A team at 2U has this on backlog, but it's low priority.

  8. added theissue type on Jan 28, 2026
  9. rahulkanneri-2u commented on Sep 1, 2026

    @rahulkanneri-2u
    Contributor

    @robrap

    Status update:

    Could someone with edit access update the task list above to point at #551 and #39047?

  10. rahulkanneri-2u commented on Sep 11, 2026

    @rahulkanneri-2u
    Contributor

    Progress update:

    openedx-platform (Celery set_code_owner_attribute decorator removal):

    edx-django-utils (non-celery code owner monitoring cleanup):

    • Closed without merging: chore: Remove non-celery code owner monitoring code and docs #551
    • Reason: removing CodeOwnerMonitoringMiddleware is 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 in utils.py are left in place as still-in-use and out of scope for now.
  11. robrap commented on Sep 11, 2026

    @robrap
    ContributorAuthor

    @feanil @kdmccormick: This is back on hold.

    • I imagine deprecation warnings need extra work to ensure they don’t repeat.
    • in the future, could we go directly to a breaking change in edx-django-utils and use the major version to communicate the breakage without warnings and waiting a named release?
  12. feanil commented on Sep 16, 2026

    @feanil
    Contributor

    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.

  13. robrap commented on Sep 16, 2026

    @robrap
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

deprProposal for deprecation & removal per OEP-21good first issueA good task for a newcomer to start with

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions