Skip to content

Commit

Permalink
feat: Remove unusued background_task transaction.
Browse files Browse the repository at this point in the history
Also add comments explaining get_current_transaction is
internal-only and will not be exposed via API.
  • Loading branch information
dianakhuang committed Oct 16, 2024
1 parent 2d7519c commit f9f6a7b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 31 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Change Log

.. There should always be an "Unreleased" section for changes pending release.
Unreleased
----------
Changed
~~~~~~~
* Remove unused ``background_task`` monitoring function.

[6.1.0] - 2024-10-15
---------------------
Changed
Expand Down
4 changes: 0 additions & 4 deletions edx_django_utils/monitoring/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ Feature support matrix for built-in telemetry backends:
- ✅
- ✅
- ✅
* - Instrument non-web tasks (``background_task``)
- ✅
- ❌
- ❌

Additional requirements for using these backends:

Expand Down
1 change: 0 additions & 1 deletion edx_django_utils/monitoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from .internal.transactions import get_current_transaction, ignore_transaction
from .internal.utils import (
accumulate,
background_task,
function_trace,
increment,
record_exception,
Expand Down
4 changes: 3 additions & 1 deletion edx_django_utils/monitoring/internal/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ def name(self):

def get_current_transaction():
"""
Returns the current transaction.
Returns the current transaction. This is only used internally and won't
be ported over to the backends framework, because transactions will be
very different based on the backend.
"""
current_transaction = None
if newrelic:
Expand Down
25 changes: 0 additions & 25 deletions edx_django_utils/monitoring/tests/test_utils.py

This file was deleted.

0 comments on commit f9f6a7b

Please sign in to comment.