diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1cf8e8d..11445c5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,17 @@ Change Log Unreleased ~~~~~~~~~~ +[5.1.0] - 2024-11-21 +~~~~~~~~~~~~~~~~~~~~ +Added +----- +* Added Datadog monitoring app which adds code owner monitoring. This is the first step in moving code owner code from edx-django-utils to this plugin. + + * Adds near duplicate of code owner middleware from edx-django-utils. + * Adds code owner span tags for celery using Datadog span processing of celery.run spans. + * Uses temporary span tags names using ``_2``, like ``code_owner_2``, for rollout and comparison with the original span tags. + * Span tag code_owner_2_module includes the task name, where the original code_owner_module does not. In both cases, the code owner is computed the same, because it is based on a prefix match. + [5.0.0] - 2024-10-22 ~~~~~~~~~~~~~~~~~~~~ Removed diff --git a/edx_arch_experiments/__init__.py b/edx_arch_experiments/__init__.py index 068150b..5a61fdb 100644 --- a/edx_arch_experiments/__init__.py +++ b/edx_arch_experiments/__init__.py @@ -2,4 +2,4 @@ A plugin to include applications under development by the architecture team at 2U. """ -__version__ = '5.0.0' +__version__ = '5.1.0' diff --git a/edx_arch_experiments/datadog_monitoring/README.rst b/edx_arch_experiments/datadog_monitoring/README.rst new file mode 100644 index 0000000..5498d75 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/README.rst @@ -0,0 +1,6 @@ +Datadog Monitoring +################### + +When installed in the LMS as a plugin app, the ``datadog_monitoring`` app adds additional monitoring. + +This is where our code_owner_2 monitoring code lives, for example. diff --git a/edx_arch_experiments/datadog_monitoring/__init__.py b/edx_arch_experiments/datadog_monitoring/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/edx_arch_experiments/datadog_monitoring/apps.py b/edx_arch_experiments/datadog_monitoring/apps.py new file mode 100644 index 0000000..5051e14 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/apps.py @@ -0,0 +1,19 @@ +""" +App for 2U-specific edx-platform Datadog monitoring. +""" +from django.apps import AppConfig + + +class DatadogMonitoring(AppConfig): + """ + Django application to handle 2U-specific Datadog monitoring. + """ + name = 'edx_arch_experiments.datadog_monitoring' + + # Mark this as a plugin app + plugin_app = {} + + def ready(self): + # Implicitly connect signal handlers decorated with @receiver + # pylint: disable=import-outside-toplevel,unused-import + from edx_arch_experiments.datadog_monitoring.signals import handlers diff --git a/edx_arch_experiments/datadog_monitoring/code_owner/__init__.py b/edx_arch_experiments/datadog_monitoring/code_owner/__init__.py new file mode 100644 index 0000000..952966e --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/code_owner/__init__.py @@ -0,0 +1,6 @@ +""" +This directory should only be used internally. + +Its public API is exposed in the top-level monitoring __init__.py. +See its README.rst for details. +""" diff --git a/edx_arch_experiments/datadog_monitoring/code_owner/datadog.py b/edx_arch_experiments/datadog_monitoring/code_owner/datadog.py new file mode 100644 index 0000000..0199907 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/code_owner/datadog.py @@ -0,0 +1,26 @@ +""" +Datadog span processor for celery span code owners. +""" +from .utils import set_code_owner_attribute_from_module + + +class CeleryCodeOwnerSpanProcessor: + """ + Datadog span processor that adds celery code owner span tags. + """ + + def on_span_start(self, span): + """ + Adds code owner span tag for celery run spans at span creation. + """ + if getattr(span, 'name', None) == 'celery.run': + # We can use this for celery spans, because the resource name is more predictable + # and available from the start. For django requests, we'll instead continue to use + # django middleware for setting code owner. + set_code_owner_attribute_from_module(span.resource) + + def on_span_finish(self, span): + pass + + def shutdown(self, _timeout): + pass diff --git a/edx_arch_experiments/datadog_monitoring/code_owner/middleware.py b/edx_arch_experiments/datadog_monitoring/code_owner/middleware.py new file mode 100644 index 0000000..f679959 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/code_owner/middleware.py @@ -0,0 +1,89 @@ +""" +Middleware for code_owner_2 custom attribute +""" +import logging + +from django.urls import resolve +from edx_django_utils.monitoring import set_custom_attribute + +from .utils import get_code_owner_from_module, is_code_owner_mappings_configured, set_code_owner_custom_attributes + +log = logging.getLogger(__name__) + + +class CodeOwnerMonitoringMiddleware: + """ + Django middleware object to set custom attributes for the owner of each view. + + For instructions on usage, see: + https://github.com/edx/edx-arch-experiments/blob/master/edx_arch_experiments/datadog_monitoring/docs/how_tos/add_code_owner_custom_attribute_to_an_ida.rst + + Custom attributes set: + - code_owner_2: The owning team mapped to the current view. + - code_owner_2_module: The module found from the request or current transaction. + - code_owner_2_path_error: The error mapping by path, if code_owner_2 isn't found in other ways. + + """ + def __init__(self, get_response): + self.get_response = get_response + + def __call__(self, request): + response = self.get_response(request) + self._set_code_owner_attribute(request) + return response + + def process_exception(self, request, exception): # pylint: disable=W0613 + self._set_code_owner_attribute(request) + + def _set_code_owner_attribute(self, request): + """ + Sets the code_owner_2 custom attribute for the request. + """ + code_owner = None + module = self._get_module_from_request(request) + if module: + code_owner = get_code_owner_from_module(module) + + if code_owner: + set_code_owner_custom_attributes(code_owner) + + def _get_module_from_request(self, request): + """ + Get the module from the request path or the current transaction. + + Side-effects: + Sets code_owner_2_module custom attribute, used to determine code_owner_2. + If module was not found, may set code_owner_2_path_error custom attribute + if applicable. + + Returns: + str: module name or None if not found + + """ + if not is_code_owner_mappings_configured(): + return None + + module, path_error = self._get_module_from_request_path(request) + if module: + set_custom_attribute('code_owner_2_module', module) + return module + + # monitor errors if module was not found + if path_error: + set_custom_attribute('code_owner_2_path_error', path_error) + return None + + def _get_module_from_request_path(self, request): + """ + Uses the request path to get the view_func module. + + Returns: + (str, str): (module, error_message), where at least one of these should be None + + """ + try: + view_func, _, _ = resolve(request.path) + module = view_func.__module__ + return module, None + except Exception as e: # pragma: no cover, pylint: disable=broad-exception-caught + return None, str(e) diff --git a/edx_arch_experiments/datadog_monitoring/code_owner/utils.py b/edx_arch_experiments/datadog_monitoring/code_owner/utils.py new file mode 100644 index 0000000..ecff3af --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/code_owner/utils.py @@ -0,0 +1,258 @@ +""" +Utilities for monitoring code_owner_2 +""" +import logging +import re + +from django.conf import settings +from edx_django_utils.monitoring import set_custom_attribute + +log = logging.getLogger(__name__) + + +def get_code_owner_from_module(module): + """ + Attempts lookup of code_owner based on a code module, + finding the most specific match. If no match, returns None. + + For example, if the module were 'openedx.features.discounts.views', + this lookup would match on 'openedx.features.discounts' before + 'openedx.features', because the former is more specific. + + See how to: + https://github.com/openedx/edx-django-utils/blob/master/edx_django_utils/monitoring/docs/how_tos/add_code_owner_custom_attribute_to_an_ida.rst + + """ + if not module: + return None + + code_owner_mappings = get_code_owner_mappings() + if not code_owner_mappings: + return None + + module_parts = module.split('.') + # To make the most specific match, start with the max number of parts + for number_of_parts in range(len(module_parts), 0, -1): + partial_path = '.'.join(module_parts[0:number_of_parts]) + if partial_path in code_owner_mappings: + code_owner = code_owner_mappings[partial_path] + return code_owner + return None + + +def is_code_owner_mappings_configured(): + """ + Returns True if code owner mappings were configured, and False otherwise. + """ + return isinstance(get_code_owner_mappings(), dict) + + +# cached lookup table for code owner given a module path. +# do not access this directly, but instead use get_code_owner_mappings. +_PATH_TO_CODE_OWNER_MAPPINGS = None + + +def get_code_owner_mappings(): + """ + Returns the contents of the CODE_OWNER_MAPPINGS Django Setting, processed + for efficient lookup by path. + + Returns: + (dict): dict mapping modules to code owners, or None if there are no + configured mappings, or an empty dict if there is an error processing + the setting. + + Example return value:: + + { + 'xblock_django': 'team-red', + 'openedx.core.djangoapps.xblock': 'team-red', + 'badges': 'team-blue', + } + + """ + global _PATH_TO_CODE_OWNER_MAPPINGS + + # Return cached processed mappings if already processed + if _PATH_TO_CODE_OWNER_MAPPINGS is not None: + return _PATH_TO_CODE_OWNER_MAPPINGS + + # Uses temporary variable to build mappings to avoid multi-threading issue with a partially + # processed map. Worst case, it is processed more than once at start-up. + path_to_code_owner_mapping = {} + + # .. setting_name: CODE_OWNER_MAPPINGS + # .. setting_default: None + # .. setting_description: Used for monitoring and reporting of ownership. Use a + # dict with keys of code owner name and value as a list of dotted path + # module names owned by the code owner. + code_owner_mappings = getattr(settings, 'CODE_OWNER_MAPPINGS', None) + if code_owner_mappings is None: + return None + + try: + for code_owner in code_owner_mappings: + path_list = code_owner_mappings[code_owner] + for path in path_list: + path_to_code_owner_mapping[path] = code_owner + optional_module_prefix_match = _OPTIONAL_MODULE_PREFIX_PATTERN.match(path) + # if path has an optional prefix, also add the module name without the prefix + if optional_module_prefix_match: + path_without_prefix = path[optional_module_prefix_match.end():] + path_to_code_owner_mapping[path_without_prefix] = code_owner + except TypeError as e: + log.exception( + 'Error processing CODE_OWNER_MAPPINGS. {}'.format(e) # pylint: disable=logging-format-interpolation + ) + raise e + + _PATH_TO_CODE_OWNER_MAPPINGS = path_to_code_owner_mapping + return _PATH_TO_CODE_OWNER_MAPPINGS + + +def set_code_owner_attribute_from_module(module): + """ + Updates the code_owner_2 and code_owner_2_module custom attributes. + + Celery tasks or other non-web functions do not use middleware, so we need + an alternative way to set the code_owner_2 custom attribute. + + Note: These settings will be overridden by the CodeOwnerMonitoringMiddleware. + This method can't be used to override web functions at this time. + + Usage:: + + set_code_owner_2_attribute_from_module(__name__) + + """ + set_custom_attribute('code_owner_2_module', module) + code_owner = get_code_owner_from_module(module) + + if code_owner: + set_code_owner_custom_attributes(code_owner) + + +def set_code_owner_custom_attributes(code_owner): + """ + Sets custom metrics for code_owner_2, code_owner_2_theme, and code_owner_2_squad + """ + if not code_owner: # pragma: no cover + return + set_custom_attribute('code_owner_2', code_owner) + theme = _get_theme_from_code_owner(code_owner) + if theme: + set_custom_attribute('code_owner_2_theme', theme) + squad = _get_squad_from_code_owner(code_owner) + if squad: + set_custom_attribute('code_owner_2_squad', squad) + + +def clear_cached_mappings(): + """ + Clears the cached code owner mappings. Useful for testing. + """ + global _PATH_TO_CODE_OWNER_MAPPINGS + _PATH_TO_CODE_OWNER_MAPPINGS = None + global _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS + _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS = None + + +# TODO: Retire this once edx-platform import_shims is no longer used. +# Note: This should be ready for removal because import_shims has been removed. +# See https://github.com/openedx/edx-platform/tree/854502b560bda74ef898501bb2a95ce238cf794c/import_shims +_OPTIONAL_MODULE_PREFIX_PATTERN = re.compile(r'^(lms|common|openedx\.core)\.djangoapps\.') + + +# Cached lookup table for code owner theme and squad given a code owner. +# - Although code owner is "theme-squad", a hyphen may also be in the theme or squad name, so this ensures we get both +# correctly from config. +# Do not access this directly, but instead use get_code_owner_theme_squad_mappings. +_CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS = None + + +def get_code_owner_theme_squad_mappings(): + """ + Returns the contents of the CODE_OWNER_THEMES Django Setting, processed + for efficient lookup by path. + + Returns: + (dict): dict mapping code owners to a dict containing the squad and theme, or + an empty dict if there are no configured mappings. + + Example return value:: + + { + 'theme-x-team-red': { + 'theme': 'theme-x', + 'squad': 'team-red', + }, + 'theme-x-team-blue': { + 'theme': 'theme-x', + 'squad': 'team-blue', + }, + } + + """ + global _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS + + # Return cached processed mappings if already processed + if _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS is not None: + return _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS + + # Uses temporary variable to build mappings to avoid multi-threading issue with a partially + # processed map. Worst case, it is processed more than once at start-up. + code_owner_to_theme_and_squad_mapping = {} + + # .. setting_name: CODE_OWNER_THEMES + # .. setting_default: None + # .. setting_description: Used for monitoring and reporting of ownership. Use a + # dict with keys of code owner themes and values as a list of code owner names + # including theme and squad, separated with a hyphen. + code_owner_themes = getattr(settings, 'CODE_OWNER_THEMES', {}) + + try: + for theme in code_owner_themes: + code_owner_list = code_owner_themes[theme] + for code_owner in code_owner_list: + squad = code_owner.split(theme + '-', 1)[1] + code_owner_details = { + 'theme': theme, + 'squad': squad, + } + code_owner_to_theme_and_squad_mapping[code_owner] = code_owner_details + except TypeError as e: + log.exception( + 'Error processing CODE_OWNER_THEMES setting. {}'.format(e) # pylint: disable=logging-format-interpolation + ) + raise e + + _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS = code_owner_to_theme_and_squad_mapping + return _CODE_OWNER_TO_THEME_AND_SQUAD_MAPPINGS + + +def _get_theme_from_code_owner(code_owner): + """ + Returns theme for a code_owner (e.g. 'theme-my-squad' => 'theme') + """ + mappings = get_code_owner_theme_squad_mappings() + if mappings is None: # pragma: no cover + return None + + if code_owner in mappings: + return mappings[code_owner]['theme'] + + return None + + +def _get_squad_from_code_owner(code_owner): + """ + Returns squad for a code_owner (e.g. 'theme-my-squad' => 'my-squad') + """ + mappings = get_code_owner_theme_squad_mappings() + if mappings is None: # pragma: no cover + return None + + if code_owner in mappings: + return mappings[code_owner]['squad'] + + return None diff --git a/edx_arch_experiments/datadog_monitoring/docs/how_tos/add_code_owner_custom_attribute_to_an_ida.rst b/edx_arch_experiments/datadog_monitoring/docs/how_tos/add_code_owner_custom_attribute_to_an_ida.rst new file mode 100644 index 0000000..a9872c2 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/docs/how_tos/add_code_owner_custom_attribute_to_an_ida.rst @@ -0,0 +1,71 @@ +Using Code_Owner Custom Span Tags +================================= + +.. contents:: + :local: + :depth: 2 + +What are the code owner custom span tags? +------------------------------------------ + +The code owner custom span tags can be used to create custom dashboards and alerts for monitoring the things that you own. It was originally introduced for the LMS, as is described in this `ADR on monitoring by code owner`_. However, it was first moved to edx-django-utils to be used in any IDA. It was later moved to this 2U-specific plugin because it is for 2U. + +The code owner custom attributes consist of: + +* code_owner_2: The owner name. When themes and squads are used, this will be the theme and squad names joined by a hyphen. +* code_owner_2_theme: The theme name of the owner. +* code_owner_2_squad: The squad name of the owner. Use this to avoid issues when theme name changes. + +Note: The ``_2`` of the code_owner_2 naming is for initial rollout to compare with edx-django-utils span tags. Ultimately, we will use adjusted names, which may include dropping the theme. + +If you want to learn more about custom span tags in general, see `Enhanced Monitoring and Custom Attributes`_. + +.. _ADR on monitoring by code owner: https://github.com/openedx/edx-platform/blob/master/lms/djangoapps/monitoring/docs/decisions/0001-monitoring-by-code-owner.rst +.. _Enhanced Monitoring and Custom Attributes: https://edx.readthedocs.io/projects/edx-django-utils/en/latest/monitoring/how_tos/using_custom_attributes.html + +Setting up the Middleware +------------------------- + +You simply need to add ``edx_arch_experiments.datadog_monitoring.code_owner.middleware.CodeOwnerMonitoringMiddleware`` to get code owner span tags on Django requests. + +Handling celery tasks +--------------------- + +For celery tasks, this plugin will automatically detect and add code owner span tags to any span with ``operation_name:celery.run``. + +This is accomplished by receiving signals from celery's worker_process_init for each process, and then adding a custom Datadog span processor to add the span tags as appropriate. + +Configuring your app settings +----------------------------- + +Once the Middleware is made available, simply set the Django Settings ``CODE_OWNER_MAPPINGS`` and ``CODE_OWNER_THEMES`` appropriately. + +The following example shows how you can include an optional config for a catch-all using ``'*'``. Although you might expect this example to use Python, it is intentionally illustrated in YAML because the catch-all requires special care in YAML. + +:: + + # YAML format of example CODE_OWNER_MAPPINGS + CODE_OWNER_MAPPINGS: + theme-x-team-red: + - xblock_django + - openedx.core.djangoapps.xblock + theme-x-team-blue: + - '*' # IMPORTANT: you must surround * with quotes in yml + + # YAML format of example CODE_OWNER_THEMES + CODE_OWNER_THEMES: + theme-x: + - theme-x-team-red + - theme-x-team-blue + +How to find and fix code_owner mappings +--------------------------------------- + +If you are missing the ``code_owner_2`` custom attributes on a particular Transaction or Error, or if ``code_owner`` is matching the catch-all, but you want to add a more specific mapping, you can use the other supporting tags like ``code_owner_2_module`` and ``code_owner_2_path_error`` to determine what the appropriate mappings should be. + +Updating Datadog monitoring +--------------------------- + +To update monitoring in the event of a squad or theme name change, see `Update Monitoring for Squad or Theme Changes`_. + +.. _Update Monitoring for Squad or Theme Changes: diff --git a/edx_arch_experiments/datadog_monitoring/docs/how_tos/update_monitoring_for_squad_or_theme_changes.rst b/edx_arch_experiments/datadog_monitoring/docs/how_tos/update_monitoring_for_squad_or_theme_changes.rst new file mode 100644 index 0000000..695a90a --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/docs/how_tos/update_monitoring_for_squad_or_theme_changes.rst @@ -0,0 +1,37 @@ +Update Monitoring for Squad or Theme Changes +============================================ + +.. contents:: + :local: + :depth: 2 + +Understanding code owner custom attributes +------------------------------------------ + +If you first need some background on the ``code_owner_2_squad`` and ``code_owner_2_theme`` custom attributes, see `Using Code_Owner Custom Span Tags`_. + +.. _Using Code_Owner Custom Span Tags: https://github.com/edx/edx-arch-experiments/blob/main/edx_arch_experiments/datadog_monitoring/docs/how_tos/add_code_owner_custom_attribute_to_an_ida.rst + +Expand and contract name changes +-------------------------------- + +Datadog monitors or dashboards may use the ``code_owner_2_squad`` or ``code_owner_2_theme`` (or ``code_owner_2``) custom span tags. + +To change a squad or theme name, you should *expand* before the change, and *contract* after the change. + +Example expand phase:: + + code_owner_2_squad:('old-squad-name', 'new-squad-name') + code_owner_2_theme:('old-theme-name', 'new-theme-name') + +Example contract phase:: + + code_owner_2_squad:'new-squad-name' + code_owner_2_theme:'new-theme-name' + +To find relevant usage of these span tags, see `Searching Datadog monitors and dashboards`_. + +Searching Datadog monitors and dashboards +----------------------------------------- + +TODO: This section needs to be updated as part of https://github.com/edx/edx-arch-experiments/issues/786, once the script has been migrated for use with Datadog. diff --git a/edx_arch_experiments/datadog_monitoring/signals/handlers.py b/edx_arch_experiments/datadog_monitoring/signals/handlers.py new file mode 100644 index 0000000..04b5ab3 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/signals/handlers.py @@ -0,0 +1,31 @@ +""" +Handlers to listen to celery signals. +""" +import logging + +from celery.signals import worker_process_init +from django.dispatch import receiver + +from edx_arch_experiments.datadog_monitoring.code_owner.datadog import CeleryCodeOwnerSpanProcessor + +log = logging.getLogger(__name__) + + +@receiver(worker_process_init) +def init_worker_process(sender, **kwargs): + """ + Adds a Datadog span processor to each worker process. + + We have to do this from inside the worker processes because they fork from the + parent process before the plugin app is initialized. + """ + try: + from ddtrace import tracer # pylint: disable=import-outside-toplevel + + tracer._span_processors.append(CeleryCodeOwnerSpanProcessor()) # pylint: disable=protected-access + log.info("Attached CeleryCodeOwnerSpanProcessor") + except ImportError: + log.warning( + "Unable to attach CeleryCodeOwnerSpanProcessor" + " -- ddtrace module not found." + ) diff --git a/edx_arch_experiments/datadog_monitoring/tests/__init__.py b/edx_arch_experiments/datadog_monitoring/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/edx_arch_experiments/datadog_monitoring/tests/code_owner/__init__.py b/edx_arch_experiments/datadog_monitoring/tests/code_owner/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/edx_arch_experiments/datadog_monitoring/tests/code_owner/mock_views.py b/edx_arch_experiments/datadog_monitoring/tests/code_owner/mock_views.py new file mode 100644 index 0000000..fddc5b4 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/tests/code_owner/mock_views.py @@ -0,0 +1,12 @@ +""" +Mock views with a different module to enable testing of mapping +code_owner to modules. Trying to mock __module__ on a view was +getting too complex. +""" +from django.views.generic import View + + +class MockViewTest(View): + """ + Mock view for use in testing. + """ diff --git a/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_datadog.py b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_datadog.py new file mode 100644 index 0000000..4769e0d --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_datadog.py @@ -0,0 +1,54 @@ +""" +Tests for datadog span processor. +""" +from unittest.mock import patch + +from django.test import TestCase + +from edx_arch_experiments.datadog_monitoring.code_owner.datadog import CeleryCodeOwnerSpanProcessor + + +class FakeSpan: + """ + A fake Span instance with span name and resource. + """ + + def __init__(self, name, resource): + self.name = name + self.resource = resource + + +class TestCeleryCodeOwnerSpanProcessor(TestCase): + """ + Tests for CeleryCodeOwnerSpanProcessor. + """ + + @patch('edx_arch_experiments.datadog_monitoring.code_owner.utils.set_custom_attribute') + def test_celery_span(self, mock_set_custom_attribute): + """ Tests processor with a celery span. """ + proc = CeleryCodeOwnerSpanProcessor() + celery_span = FakeSpan('celery.run', 'test.module.for.celery.task') + + proc.on_span_start(celery_span) + + mock_set_custom_attribute.assert_called_once_with('code_owner_2_module', 'test.module.for.celery.task') + + @patch('edx_arch_experiments.datadog_monitoring.code_owner.utils.set_custom_attribute') + def test_other_span(self, mock_set_custom_attribute): + """ Tests processor with a non-celery span. """ + proc = CeleryCodeOwnerSpanProcessor() + celery_span = FakeSpan('other.span', 'test.resource.name') + + proc.on_span_start(celery_span) + + mock_set_custom_attribute.assert_not_called() + + @patch('edx_arch_experiments.datadog_monitoring.code_owner.utils.set_custom_attribute') + def test_non_span(self, mock_set_custom_attribute): + """ Tests processor with an object that doesn't have span name or resource. """ + proc = CeleryCodeOwnerSpanProcessor() + non_span = object() + + proc.on_span_start(non_span) + + mock_set_custom_attribute.assert_not_called() diff --git a/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_middleware.py b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_middleware.py new file mode 100644 index 0000000..eb4313d --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_middleware.py @@ -0,0 +1,151 @@ +""" +Tests for the code_owner monitoring middleware +""" +from unittest import TestCase +from unittest.mock import ANY, MagicMock, Mock, call, patch + +import ddt +from django.test import RequestFactory, override_settings +from django.urls import re_path +from django.views.generic import View + +from edx_arch_experiments.datadog_monitoring.code_owner.middleware import CodeOwnerMonitoringMiddleware +from edx_arch_experiments.datadog_monitoring.code_owner.utils import clear_cached_mappings + +from .mock_views import MockViewTest + + +class MockMiddlewareViewTest(View): + pass + + +urlpatterns = [ + re_path(r'^middleware-test/$', MockMiddlewareViewTest.as_view()), + re_path(r'^test/$', MockViewTest.as_view()), +] + +SET_CUSTOM_ATTRIBUTE_MOCK = MagicMock() + + +# Enables the same mock to be used from different modules, using +# patch with new_callable=get_set_custom_attribute_mock +def get_set_custom_attribute_mock(): + return SET_CUSTOM_ATTRIBUTE_MOCK + + +@ddt.ddt +class CodeOwnerMetricMiddlewareTests(TestCase): + """ + Tests for the code_owner monitoring utility functions + """ + urls = 'lms.djangoapps.monitoring.tests.test_middleware.test_urls' + + def setUp(self): + super().setUp() + clear_cached_mappings() + SET_CUSTOM_ATTRIBUTE_MOCK.reset_mock() + self.mock_get_response = Mock() + self.middleware = CodeOwnerMonitoringMiddleware(self.mock_get_response) + + def test_init(self): + self.assertEqual(self.middleware.get_response, self.mock_get_response) + + def test_request_call(self): + self.mock_get_response.return_value = 'test-response' + request = Mock() + self.assertEqual(self.middleware(request), 'test-response') + + _REQUEST_PATH_TO_MODULE_PATH = { + '/middleware-test/': 'edx_arch_experiments.datadog_monitoring.tests.code_owner.test_middleware', + '/test/': 'edx_arch_experiments.datadog_monitoring.tests.code_owner.mock_views', + } + + @override_settings( + CODE_OWNER_MAPPINGS={'team-red': ['edx_arch_experiments.datadog_monitoring.tests.code_owner.mock_views']}, + CODE_OWNER_THEMES={'team': ['team-red']}, + ROOT_URLCONF=__name__, + ) + @patch( + 'edx_arch_experiments.datadog_monitoring.code_owner.middleware.set_custom_attribute', + new_callable=get_set_custom_attribute_mock + ) + @patch( + 'edx_arch_experiments.datadog_monitoring.code_owner.utils.set_custom_attribute', + new_callable=get_set_custom_attribute_mock + ) + @ddt.data( + ('/middleware-test/', None), + ('/test/', 'team-red'), + ) + @ddt.unpack + def test_code_owner_path_mapping_hits_and_misses( + self, request_path, expected_owner, mock_set_custom_attribute, _ + ): + request = RequestFactory().get(request_path) + self.middleware(request) + expected_path_module = self._REQUEST_PATH_TO_MODULE_PATH[request_path] + self._assert_code_owner_custom_attributes( + mock_set_custom_attribute, expected_code_owner=expected_owner, path_module=expected_path_module, + check_theme_and_squad=True + ) + + mock_set_custom_attribute.reset_mock() + self.middleware.process_exception(request, None) + self._assert_code_owner_custom_attributes( + mock_set_custom_attribute, expected_code_owner=expected_owner, path_module=expected_path_module, + check_theme_and_squad=True + ) + + @override_settings( + ROOT_URLCONF=__name__, + ) + @patch('edx_arch_experiments.datadog_monitoring.code_owner.middleware.set_custom_attribute') + def test_code_owner_no_mappings(self, mock_set_custom_attribute): + request = RequestFactory().get('/test/') + self.middleware(request) + mock_set_custom_attribute.assert_not_called() + + @override_settings( + CODE_OWNER_MAPPINGS={'team-red': ['lms.djangoapps.monitoring.tests.mock_views']}, + ) + @patch( + 'edx_arch_experiments.datadog_monitoring.code_owner.middleware.set_custom_attribute', + new_callable=get_set_custom_attribute_mock + ) + def test_no_resolver_for_path(self, mock_set_custom_attribute): + request = RequestFactory().get('/bad/path/') + self.middleware(request) + self._assert_code_owner_custom_attributes( + mock_set_custom_attribute, has_path_error=True + ) + + @override_settings( + CODE_OWNER_MAPPINGS=['invalid_setting_as_list'], + ROOT_URLCONF=__name__, + ) + def test_load_config_with_invalid_dict(self): + request = RequestFactory().get('/test/') + with self.assertRaises(TypeError): + self.middleware(request) + + def _assert_code_owner_custom_attributes( + self, mock_set_custom_attribute, expected_code_owner=None, + path_module=None, has_path_error=False, + check_theme_and_squad=False + ): # pylint: disable=too-many-positional-arguments + """ Performs a set of assertions around having set the proper custom attributes. """ + call_list = [] + if expected_code_owner: + call_list.append(call('code_owner_2', expected_code_owner)) + if check_theme_and_squad: + call_list.append(call('code_owner_2_theme', expected_code_owner.split('-')[0])) + call_list.append(call('code_owner_2_squad', expected_code_owner.split('-')[1])) + if path_module: + call_list.append(call('code_owner_2_module', path_module)) + if has_path_error: + call_list.append(call('code_owner_2_path_error', ANY)) + mock_set_custom_attribute.assert_has_calls(call_list, any_order=True) + self.assertEqual( + len(mock_set_custom_attribute.call_args_list), len(call_list), + f'Expected calls {call_list} vs actual calls {mock_set_custom_attribute.call_args_list}' + ) diff --git a/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_utils.py b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_utils.py new file mode 100644 index 0000000..be17856 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/tests/code_owner/test_utils.py @@ -0,0 +1,105 @@ +""" +Tests for the code_owner monitoring middleware +""" +import timeit +from unittest import TestCase +from unittest.mock import call, patch + +import ddt +from django.test import override_settings + +from edx_arch_experiments.datadog_monitoring.code_owner.utils import ( + clear_cached_mappings, + get_code_owner_from_module, + set_code_owner_attribute_from_module, +) + + +@ddt.ddt +class MonitoringUtilsTests(TestCase): + """ + Tests for the code_owner monitoring utility functions + """ + def setUp(self): + super().setUp() + clear_cached_mappings() + + @override_settings(CODE_OWNER_MAPPINGS={ + 'team-red': [ + 'openedx.core.djangoapps.xblock', + 'lms.djangoapps.grades', + ], + 'team-blue': [ + 'common.djangoapps.xblock_django', + ], + }) + @ddt.data( + ('xbl', None), + ('xblock_2', None), + ('xblock', 'team-red'), + ('openedx.core.djangoapps', None), + ('openedx.core.djangoapps.xblock', 'team-red'), + ('openedx.core.djangoapps.xblock.views', 'team-red'), + ('grades', 'team-red'), + ('lms.djangoapps.grades', 'team-red'), + ('xblock_django', 'team-blue'), + ('common.djangoapps.xblock_django', 'team-blue'), + ) + @ddt.unpack + def test_code_owner_mapping_hits_and_misses(self, module, expected_owner): + actual_owner = get_code_owner_from_module(module) + self.assertEqual(expected_owner, actual_owner) + + @override_settings(CODE_OWNER_MAPPINGS=['invalid_setting_as_list']) + @patch('edx_arch_experiments.datadog_monitoring.code_owner.utils.log') + def test_code_owner_mapping_with_invalid_dict(self, mock_logger): + with self.assertRaises(TypeError): + get_code_owner_from_module('xblock') + + mock_logger.exception.assert_called_with( + 'Error processing CODE_OWNER_MAPPINGS. list indices must be integers or slices, not str', + ) + + def test_code_owner_mapping_with_no_settings(self): + self.assertIsNone(get_code_owner_from_module('xblock')) + + def test_code_owner_mapping_with_no_module(self): + self.assertIsNone(get_code_owner_from_module(None)) + + def test_mapping_performance(self): + code_owner_mappings = { + 'team-red': [] + } + # create a long list of mappings that are nearly identical + for n in range(1, 200): + path = f'openedx.core.djangoapps.{n}' + code_owner_mappings['team-red'].append(path) + with override_settings(CODE_OWNER_MAPPINGS=code_owner_mappings): + call_iterations = 100 + time = timeit.timeit( + # test a module name that matches nearly to the end, but doesn't actually match + lambda: get_code_owner_from_module('openedx.core.djangoapps.XXX.views'), number=call_iterations + ) + average_time = time / call_iterations + self.assertLess(average_time, 0.0005, f'Mapping takes {average_time}s which is too slow.') + + @override_settings(CODE_OWNER_MAPPINGS={ + 'team-red': ['edx_arch_experiments.datadog_monitoring.tests.code_owner.test_utils'] + }) + @patch('edx_arch_experiments.datadog_monitoring.code_owner.utils.set_custom_attribute') + def test_set_code_owner_attribute_from_module_success(self, mock_set_custom_attribute): + set_code_owner_attribute_from_module(__name__) + self._assert_set_custom_attribute(mock_set_custom_attribute, code_owner='team-red', module=__name__) + + def _assert_set_custom_attribute(self, mock_set_custom_attribute, code_owner, module, check_theme_and_squad=False): + """ + Helper to assert that the proper set_custom_metric calls were made. + """ + call_list = [] + if code_owner: + call_list.append(call('code_owner_2', code_owner)) + if check_theme_and_squad: + call_list.append(call('code_owner_2_theme', code_owner.split('-')[0])) + call_list.append(call('code_owner_2_squad', code_owner.split('-')[1])) + call_list.append(call('code_owner_2_module', module)) + mock_set_custom_attribute.assert_has_calls(call_list, any_order=True) diff --git a/edx_arch_experiments/datadog_monitoring/tests/signals/test_handlers.py b/edx_arch_experiments/datadog_monitoring/tests/signals/test_handlers.py new file mode 100644 index 0000000..c0816a7 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/tests/signals/test_handlers.py @@ -0,0 +1,33 @@ +""" +Tests for celery signal handler. +""" +from ddtrace import tracer +from django.test import TestCase + +from edx_arch_experiments.datadog_monitoring.signals.handlers import init_worker_process + + +class TestHandlers(TestCase): + """Tests for signal handlers.""" + + def setUp(self): + # Remove custom span processor from previous runs. + # pylint: disable=protected-access + tracer._span_processors = [ + sp for sp in tracer._span_processors if type(sp).__name__ != 'CeleryCodeOwnerSpanProcessor' + ] + + def test_init_worker_process(self): + def get_processor_list(): + # pylint: disable=protected-access + return [type(sp).__name__ for sp in tracer._span_processors] + + assert sorted(get_processor_list()) == [ + 'EndpointCallCounterProcessor', 'TopLevelSpanProcessor', + ] + + init_worker_process(sender=None) + + assert sorted(get_processor_list()) == [ + 'CeleryCodeOwnerSpanProcessor', 'EndpointCallCounterProcessor', 'TopLevelSpanProcessor', + ] diff --git a/edx_arch_experiments/datadog_monitoring/tests/test_apps.py b/edx_arch_experiments/datadog_monitoring/tests/test_apps.py new file mode 100644 index 0000000..bdea120 --- /dev/null +++ b/edx_arch_experiments/datadog_monitoring/tests/test_apps.py @@ -0,0 +1,23 @@ +""" +Tests for plugin app. +""" +from celery.signals import worker_process_init +from django.test import TestCase + + +class TestDatadogMonitoringApp(TestCase): + """ + Tests for TestDatadogMonitoringApp. + """ + + def test_signal_has_receiver(self): + """ + Imperfect test to ensure celery signal has the receiver. + + The receiver gets added during DatadogMonitoringApp's ready() call + at load time. An attempt to disconnect the receiver did not allow it + to be re-added during a call to ready, presumably because the signal + was already imported. + """ + # the name of the function is in the weakref __repr__ + assert 'init_worker_process' in repr(worker_process_init.receivers[0][1]) diff --git a/requirements/base.in b/requirements/base.in index 0c30bbe..3a3af4f 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -1,8 +1,9 @@ # Core requirements for using this application -c constraints.txt -Django # Web application framework -edx_django_utils +celery # Asynchronous task execution library +Django # Web application framework +edx_django_utils # Basic utilities for plugins, monitoring, and more django-waffle # Configuration switches and flags -- used by config_watcher app edx-codejail # Actual codejail library; used by codejail_service app djangorestframework # Used by codejail_service app diff --git a/requirements/base.txt b/requirements/base.txt index f07f33a..5985616 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,12 +4,18 @@ # # make upgrade # +amqp==5.3.1 + # via kombu asgiref==3.8.1 # via django attrs==24.2.0 # via # jsonschema # referencing +billiard==4.2.1 + # via celery +celery==5.4.0 + # via -r requirements/base.in certifi==2024.8.30 # via requests cffi==1.17.1 @@ -20,9 +26,19 @@ charset-normalizer==3.4.0 # via requests click==8.1.7 # via + # celery + # click-didyoumean + # click-plugins + # click-repl # code-annotations # edx-django-utils -code-annotations==1.8.0 +click-didyoumean==0.3.1 + # via celery +click-plugins==1.1.1 + # via celery +click-repl==0.3.0 + # via celery +code-annotations==1.8.2 # via edx-toggles cryptography==43.0.3 # via pyjwt @@ -41,7 +57,7 @@ django-crum==0.7.9 # via # edx-django-utils # edx-toggles -django-waffle==4.1.0 +django-waffle==4.2.0 # via # -r requirements/base.in # edx-django-utils @@ -56,7 +72,7 @@ dnspython==2.7.0 # via pymongo drf-jwt==1.19.2 # via edx-drf-extensions -edx-codejail==3.5.1 +edx-codejail==3.5.2 # via -r requirements/base.in edx-django-utils==7.0.0 # via @@ -77,17 +93,21 @@ jsonschema==4.23.0 # via -r requirements/base.in jsonschema-specifications==2024.10.1 # via jsonschema +kombu==5.4.2 + # via celery markupsafe==3.0.2 # via jinja2 -newrelic==10.2.0 +newrelic==10.3.0 # via edx-django-utils pbr==6.1.0 # via stevedore +prompt-toolkit==3.0.48 + # via click-repl psutil==6.1.0 # via edx-django-utils pycparser==2.22 # via cffi -pyjwt[crypto]==2.9.0 +pyjwt[crypto]==2.10.0 # via # drf-jwt # edx-drf-extensions @@ -95,6 +115,8 @@ pymongo==4.10.1 # via edx-opaque-keys pynacl==1.5.0 # via edx-django-utils +python-dateutil==2.9.0.post0 + # via celery python-slugify==8.0.4 # via code-annotations pyyaml==6.0.2 @@ -105,17 +127,19 @@ referencing==0.35.1 # jsonschema-specifications requests==2.32.3 # via edx-drf-extensions -rpds-py==0.20.0 +rpds-py==0.21.0 # via # jsonschema # referencing semantic-version==2.10.0 # via edx-drf-extensions six==1.16.0 - # via edx-codejail -sqlparse==0.5.1 + # via + # edx-codejail + # python-dateutil +sqlparse==0.5.2 # via django -stevedore==5.3.0 +stevedore==5.4.0 # via # code-annotations # edx-django-utils @@ -124,9 +148,20 @@ text-unidecode==1.3 # via python-slugify typing-extensions==4.12.2 # via edx-opaque-keys +tzdata==2024.2 + # via + # celery + # kombu urllib3==2.2.3 # via requests +vine==5.1.0 + # via + # amqp + # celery + # kombu +wcwidth==0.2.13 + # via prompt-toolkit # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.6.0 # via -r requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index deec652..e128790 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -16,7 +16,7 @@ filelock==3.16.1 # via # tox # virtualenv -packaging==24.1 +packaging==24.2 # via # pyproject-api # tox @@ -30,5 +30,5 @@ pyproject-api==1.8.0 # via tox tox==4.23.2 # via -r requirements/ci.in -virtualenv==20.27.0 +virtualenv==20.27.1 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 9f0fb85..a595cf2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,6 +4,10 @@ # # make upgrade # +amqp==5.3.1 + # via + # -r requirements/quality.txt + # kombu asgiref==3.8.1 # via # -r requirements/quality.txt @@ -22,14 +26,24 @@ backports-tarfile==1.2.0 # via # -r requirements/quality.txt # jaraco-context +billiard==4.2.1 + # via + # -r requirements/quality.txt + # celery build==1.2.2.post1 # via # -r requirements/pip-tools.txt # pip-tools +bytecode==0.16.0 + # via + # -r requirements/quality.txt + # ddtrace cachetools==5.5.0 # via # -r requirements/ci.txt # tox +celery==5.4.0 + # via -r requirements/quality.txt certifi==2024.8.30 # via # -r requirements/quality.txt @@ -52,16 +66,32 @@ click==8.1.7 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt + # celery + # click-didyoumean # click-log + # click-plugins + # click-repl # code-annotations # edx-django-utils # edx-lint # pip-tools +click-didyoumean==0.3.1 + # via + # -r requirements/quality.txt + # celery click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==1.8.0 +click-plugins==1.1.1 + # via + # -r requirements/quality.txt + # celery +click-repl==0.3.0 + # via + # -r requirements/quality.txt + # celery +code-annotations==1.8.2 # via # -r requirements/quality.txt # edx-lint @@ -70,7 +100,7 @@ colorama==0.4.6 # via # -r requirements/ci.txt # tox -coverage[toml]==7.6.4 +coverage[toml]==7.6.7 # via # -r requirements/quality.txt # pytest-cov @@ -81,6 +111,12 @@ cryptography==43.0.3 # secretstorage ddt==1.7.2 # via -r requirements/quality.txt +ddtrace==2.16.4 + # via -r requirements/quality.txt +deprecated==1.2.15 + # via + # -r requirements/quality.txt + # opentelemetry-api diff-cover==9.2.0 # via -r requirements/dev.in dill==0.3.9 @@ -108,7 +144,7 @@ django-crum==0.7.9 # -r requirements/quality.txt # edx-django-utils # edx-toggles -django-waffle==4.1.0 +django-waffle==4.2.0 # via # -r requirements/quality.txt # edx-django-utils @@ -131,7 +167,7 @@ drf-jwt==1.19.2 # via # -r requirements/quality.txt # edx-drf-extensions -edx-codejail==3.5.1 +edx-codejail==3.5.2 # via -r requirements/quality.txt edx-django-utils==7.0.0 # via @@ -142,7 +178,7 @@ edx-drf-extensions==10.5.0 # via -r requirements/quality.txt edx-i18n-tools==1.6.3 # via -r requirements/dev.in -edx-lint==5.4.0 +edx-lint==5.4.1 # via -r requirements/quality.txt edx-opaque-keys==2.11.0 # via @@ -150,6 +186,10 @@ edx-opaque-keys==2.11.0 # edx-drf-extensions edx-toggles==5.2.0 # via -r requirements/quality.txt +envier==0.6.1 + # via + # -r requirements/quality.txt + # ddtrace filelock==3.16.1 # via # -r requirements/ci.txt @@ -163,6 +203,7 @@ importlib-metadata==8.5.0 # via # -r requirements/quality.txt # keyring + # opentelemetry-api # twine iniconfig==2.0.0 # via @@ -204,11 +245,15 @@ keyring==25.5.0 # via # -r requirements/quality.txt # twine +kombu==5.4.2 + # via + # -r requirements/quality.txt + # celery lxml[html-clean,html_clean]==5.3.0 # via # edx-i18n-tools # lxml-html-clean -lxml-html-clean==0.3.1 +lxml-html-clean==0.4.1 # via lxml markdown-it-py==3.0.0 # via @@ -231,7 +276,7 @@ more-itertools==10.5.0 # -r requirements/quality.txt # jaraco-classes # jaraco-functools -newrelic==10.2.0 +newrelic==10.3.0 # via # -r requirements/quality.txt # edx-django-utils @@ -239,7 +284,11 @@ nh3==0.2.18 # via # -r requirements/quality.txt # readme-renderer -packaging==24.1 +opentelemetry-api==1.28.2 + # via + # -r requirements/quality.txt + # ddtrace +packaging==24.2 # via # -r requirements/ci.txt # -r requirements/pip-tools.txt @@ -276,6 +325,14 @@ pluggy==1.5.0 # tox polib==1.2.0 # via edx-i18n-tools +prompt-toolkit==3.0.48 + # via + # -r requirements/quality.txt + # click-repl +protobuf==5.28.3 + # via + # -r requirements/quality.txt + # ddtrace psutil==6.1.0 # via # -r requirements/quality.txt @@ -294,7 +351,7 @@ pygments==2.18.0 # diff-cover # readme-renderer # rich -pyjwt[crypto]==2.9.0 +pyjwt[crypto]==2.10.0 # via # -r requirements/quality.txt # drf-jwt @@ -342,12 +399,16 @@ pytest==8.3.3 # pytest-cov # pytest-django # pytest-randomly -pytest-cov==5.0.0 +pytest-cov==6.0.0 # via -r requirements/quality.txt pytest-django==4.9.0 # via -r requirements/quality.txt pytest-randomly==3.16.0 # via -r requirements/quality.txt +python-dateutil==2.9.0.post0 + # via + # -r requirements/quality.txt + # celery python-slugify==8.0.4 # via # -r requirements/quality.txt @@ -380,11 +441,11 @@ rfc3986==2.0.0 # via # -r requirements/quality.txt # twine -rich==13.9.3 +rich==13.9.4 # via # -r requirements/quality.txt # twine -rpds-py==0.20.0 +rpds-py==0.21.0 # via # -r requirements/quality.txt # jsonschema @@ -402,15 +463,16 @@ six==1.16.0 # -r requirements/quality.txt # edx-codejail # edx-lint + # python-dateutil snowballstemmer==2.2.0 # via # -r requirements/quality.txt # pydocstyle -sqlparse==0.5.1 +sqlparse==0.5.2 # via # -r requirements/quality.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/quality.txt # code-annotations @@ -431,21 +493,46 @@ twine==5.1.1 typing-extensions==4.12.2 # via # -r requirements/quality.txt + # ddtrace # edx-opaque-keys +tzdata==2024.2 + # via + # -r requirements/quality.txt + # celery + # kombu urllib3==2.2.3 # via # -r requirements/quality.txt # requests # twine -virtualenv==20.27.0 +vine==5.1.0 + # via + # -r requirements/quality.txt + # amqp + # celery + # kombu +virtualenv==20.27.1 # via # -r requirements/ci.txt # tox -wheel==0.44.0 +wcwidth==0.2.13 + # via + # -r requirements/quality.txt + # prompt-toolkit +wheel==0.45.0 # via # -r requirements/pip-tools.txt # pip-tools -zipp==3.20.2 +wrapt==1.16.0 + # via + # -r requirements/quality.txt + # ddtrace + # deprecated +xmltodict==0.14.2 + # via + # -r requirements/quality.txt + # ddtrace +zipp==3.21.0 # via # -r requirements/quality.txt # importlib-metadata @@ -453,9 +540,10 @@ zipp==3.20.2 # The following packages are considered to be unsafe in a requirements file: pip==24.2 # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/pip-tools.txt # pip-tools -setuptools==75.2.0 +setuptools==75.6.0 # via # -r requirements/pip-tools.txt # -r requirements/quality.txt diff --git a/requirements/doc.txt b/requirements/doc.txt index e695779..6126fda 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -6,8 +6,12 @@ # accessible-pygments==0.0.5 # via pydata-sphinx-theme -alabaster==0.7.16 +alabaster==1.0.0 # via sphinx +amqp==5.3.1 + # via + # -r requirements/test.txt + # kombu asgiref==3.8.1 # via # -r requirements/test.txt @@ -23,13 +27,11 @@ babel==2.16.0 # sphinx beautifulsoup4==4.12.3 # via pydata-sphinx-theme -billiard==4.2.0 +billiard==4.2.1 # via # -r requirements/test.txt # celery -bytecode==0.15.1 - -bytecode==0.15.1 +bytecode==0.16.0 # via # -r requirements/test.txt # ddtrace @@ -51,13 +53,29 @@ charset-normalizer==3.4.0 click==8.1.7 # via # -r requirements/test.txt + # celery + # click-didyoumean + # click-plugins + # click-repl # code-annotations # edx-django-utils -code-annotations==1.8.0 +click-didyoumean==0.3.1 + # via + # -r requirements/test.txt + # celery +click-plugins==1.1.1 + # via + # -r requirements/test.txt + # celery +click-repl==0.3.0 + # via + # -r requirements/test.txt + # celery +code-annotations==1.8.2 # via # -r requirements/test.txt # edx-toggles -coverage[toml]==7.6.4 +coverage[toml]==7.6.7 # via # -r requirements/test.txt # pytest-cov @@ -67,9 +85,16 @@ cryptography==43.0.3 # pyjwt ddt==1.7.2 # via -r requirements/test.txt +ddtrace==2.16.4 + # via -r requirements/test.txt +deprecated==1.2.15 + # via + # -r requirements/test.txt + # opentelemetry-api django==4.2.16 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # -r requirements/test.txt # django-crum # django-waffle # djangorestframework @@ -82,7 +107,7 @@ django-crum==0.7.9 # -r requirements/test.txt # edx-django-utils # edx-toggles -django-waffle==4.1.0 +django-waffle==4.2.0 # via # -r requirements/test.txt # edx-django-utils @@ -110,7 +135,7 @@ drf-jwt==1.19.2 # via # -r requirements/test.txt # edx-drf-extensions -edx-codejail==3.5.1 +edx-codejail==3.5.2 # via -r requirements/test.txt edx-django-utils==7.0.0 # via @@ -125,20 +150,20 @@ edx-opaque-keys==2.11.0 # edx-drf-extensions edx-toggles==5.2.0 # via -r requirements/test.txt -envier==0.5.2 +envier==0.6.1 # via # -r requirements/test.txt # ddtrace -exceptiongroup==1.2.2 - # via - # cattrs - # pytest idna==3.10 # via # -r requirements/test.txt # requests imagesize==1.4.1 # via sphinx +importlib-metadata==8.5.0 + # via + # -r requirements/test.txt + # opentelemetry-api iniconfig==2.0.0 # via # -r requirements/test.txt @@ -154,20 +179,27 @@ jsonschema-specifications==2024.10.1 # via # -r requirements/test.txt # jsonschema +kombu==5.4.2 + # via + # -r requirements/test.txt + # celery markupsafe==3.0.2 # via # -r requirements/test.txt # jinja2 -newrelic==10.2.0 +newrelic==10.3.0 # via # -r requirements/test.txt # edx-django-utils nh3==0.2.18 # via readme-renderer -packaging==24.1 +opentelemetry-api==1.28.2 + # via + # -r requirements/test.txt + # ddtrace +packaging==24.2 # via # -r requirements/test.txt - # pydata-sphinx-theme # pytest # sphinx pbr==6.1.0 @@ -178,6 +210,14 @@ pluggy==1.5.0 # via # -r requirements/test.txt # pytest +prompt-toolkit==3.0.48 + # via + # -r requirements/test.txt + # click-repl +protobuf==5.28.3 + # via + # -r requirements/test.txt + # ddtrace psutil==6.1.0 # via # -r requirements/test.txt @@ -186,7 +226,7 @@ pycparser==2.22 # via # -r requirements/test.txt # cffi -pydata-sphinx-theme==0.15.4 +pydata-sphinx-theme==0.16.0 # via sphinx-book-theme pygments==2.18.0 # via @@ -195,7 +235,7 @@ pygments==2.18.0 # pydata-sphinx-theme # readme-renderer # sphinx -pyjwt[crypto]==2.9.0 +pyjwt[crypto]==2.10.0 # via # -r requirements/test.txt # drf-jwt @@ -214,12 +254,16 @@ pytest==8.3.3 # pytest-cov # pytest-django # pytest-randomly -pytest-cov==5.0.0 +pytest-cov==6.0.0 # via -r requirements/test.txt pytest-django==4.9.0 # via -r requirements/test.txt pytest-randomly==3.16.0 # via -r requirements/test.txt +python-dateutil==2.9.0.post0 + # via + # -r requirements/test.txt + # celery python-slugify==8.0.4 # via # -r requirements/test.txt @@ -242,7 +286,7 @@ requests==2.32.3 # sphinx restructuredtext-lint==1.4.0 # via doc8 -rpds-py==0.20.0 +rpds-py==0.21.0 # via # -r requirements/test.txt # jsonschema @@ -255,11 +299,12 @@ six==1.16.0 # via # -r requirements/test.txt # edx-codejail + # python-dateutil snowballstemmer==2.2.0 # via sphinx -soupsieve==2.5 +soupsieve==2.6 # via beautifulsoup4 -sphinx==5.3.0 +sphinx==8.1.3 # via # -r requirements/doc.in # pydata-sphinx-theme @@ -278,11 +323,11 @@ sphinxcontrib-qthelp==2.0.0 # via sphinx sphinxcontrib-serializinghtml==2.0.0 # via sphinx -sqlparse==0.5.1 +sqlparse==0.5.2 # via # -r requirements/test.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/test.txt # code-annotations @@ -293,28 +338,45 @@ text-unidecode==1.3 # via # -r requirements/test.txt # python-slugify -tomli==2.0.1 - # via - # coverage - # doc8 - # pytest typing-extensions==4.12.2 # via # -r requirements/test.txt + # ddtrace + # edx-opaque-keys # pydata-sphinx-theme -tzdata==2024.1 +tzdata==2024.2 # via # -r requirements/test.txt # celery # kombu - # edx-opaque-keys urllib3==2.2.3 # via # -r requirements/test.txt # requests - -# The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +vine==5.1.0 # via # -r requirements/test.txt - # sphinx + # amqp + # celery + # kombu +wcwidth==0.2.13 + # via + # -r requirements/test.txt + # prompt-toolkit +wrapt==1.16.0 + # via + # -r requirements/test.txt + # ddtrace + # deprecated +xmltodict==0.14.2 + # via + # -r requirements/test.txt + # ddtrace +zipp==3.21.0 + # via + # -r requirements/test.txt + # importlib-metadata + +# The following packages are considered to be unsafe in a requirements file: +setuptools==75.6.0 + # via -r requirements/test.txt diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index c6ff62d..8d7dfd5 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -8,7 +8,7 @@ build==1.2.2.post1 # via pip-tools click==8.1.7 # via pip-tools -packaging==24.1 +packaging==24.2 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in @@ -16,11 +16,13 @@ pyproject-hooks==1.2.0 # via # build # pip-tools -wheel==0.44.0 +wheel==0.45.0 # via pip-tools # The following packages are considered to be unsafe in a requirements file: pip==24.2 - # via pip-tools -setuptools==75.2.0 + # via + # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt + # pip-tools +setuptools==75.6.0 # via pip-tools diff --git a/requirements/pip.txt b/requirements/pip.txt index 346a061..bdde397 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,11 +4,11 @@ # # make upgrade # -wheel==0.44.0 +wheel==0.45.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==24.2 +pip==24.3.1 # via -r requirements/pip.in -setuptools==75.2.0 +setuptools==75.6.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index e82b403..0ca72ba 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -4,6 +4,10 @@ # # make upgrade # +amqp==5.3.1 + # via + # -r requirements/test.txt + # kombu asgiref==3.8.1 # via # -r requirements/test.txt @@ -19,6 +23,16 @@ attrs==24.2.0 # referencing backports-tarfile==1.2.0 # via jaraco-context +billiard==4.2.1 + # via + # -r requirements/test.txt + # celery +bytecode==0.16.0 + # via + # -r requirements/test.txt + # ddtrace +celery==5.4.0 + # via -r requirements/test.txt certifi==2024.8.30 # via # -r requirements/test.txt @@ -35,18 +49,34 @@ charset-normalizer==3.4.0 click==8.1.7 # via # -r requirements/test.txt + # celery + # click-didyoumean # click-log + # click-plugins + # click-repl # code-annotations # edx-django-utils # edx-lint +click-didyoumean==0.3.1 + # via + # -r requirements/test.txt + # celery click-log==0.4.0 # via edx-lint -code-annotations==1.8.0 +click-plugins==1.1.1 + # via + # -r requirements/test.txt + # celery +click-repl==0.3.0 + # via + # -r requirements/test.txt + # celery +code-annotations==1.8.2 # via # -r requirements/test.txt # edx-lint # edx-toggles -coverage[toml]==7.6.4 +coverage[toml]==7.6.7 # via # -r requirements/test.txt # pytest-cov @@ -57,6 +87,12 @@ cryptography==43.0.3 # secretstorage ddt==1.7.2 # via -r requirements/test.txt +ddtrace==2.16.4 + # via -r requirements/test.txt +deprecated==1.2.15 + # via + # -r requirements/test.txt + # opentelemetry-api dill==0.3.9 # via pylint django==4.2.16 @@ -75,7 +111,7 @@ django-crum==0.7.9 # -r requirements/test.txt # edx-django-utils # edx-toggles -django-waffle==4.1.0 +django-waffle==4.2.0 # via # -r requirements/test.txt # edx-django-utils @@ -96,7 +132,7 @@ drf-jwt==1.19.2 # via # -r requirements/test.txt # edx-drf-extensions -edx-codejail==3.5.1 +edx-codejail==3.5.2 # via -r requirements/test.txt edx-django-utils==7.0.0 # via @@ -105,7 +141,7 @@ edx-django-utils==7.0.0 # edx-toggles edx-drf-extensions==10.5.0 # via -r requirements/test.txt -edx-lint==5.4.0 +edx-lint==5.4.1 # via -r requirements/quality.in edx-opaque-keys==2.11.0 # via @@ -113,13 +149,19 @@ edx-opaque-keys==2.11.0 # edx-drf-extensions edx-toggles==5.2.0 # via -r requirements/test.txt +envier==0.6.1 + # via + # -r requirements/test.txt + # ddtrace idna==3.10 # via # -r requirements/test.txt # requests importlib-metadata==8.5.0 # via + # -r requirements/test.txt # keyring + # opentelemetry-api # twine iniconfig==2.0.0 # via @@ -151,6 +193,10 @@ jsonschema-specifications==2024.10.1 # jsonschema keyring==25.5.0 # via twine +kombu==5.4.2 + # via + # -r requirements/test.txt + # celery markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 @@ -165,13 +211,17 @@ more-itertools==10.5.0 # via # jaraco-classes # jaraco-functools -newrelic==10.2.0 +newrelic==10.3.0 # via # -r requirements/test.txt # edx-django-utils nh3==0.2.18 # via readme-renderer -packaging==24.1 +opentelemetry-api==1.28.2 + # via + # -r requirements/test.txt + # ddtrace +packaging==24.2 # via # -r requirements/test.txt # pytest @@ -187,6 +237,14 @@ pluggy==1.5.0 # via # -r requirements/test.txt # pytest +prompt-toolkit==3.0.48 + # via + # -r requirements/test.txt + # click-repl +protobuf==5.28.3 + # via + # -r requirements/test.txt + # ddtrace psutil==6.1.0 # via # -r requirements/test.txt @@ -203,7 +261,7 @@ pygments==2.18.0 # via # readme-renderer # rich -pyjwt[crypto]==2.9.0 +pyjwt[crypto]==2.10.0 # via # -r requirements/test.txt # drf-jwt @@ -236,12 +294,16 @@ pytest==8.3.3 # pytest-cov # pytest-django # pytest-randomly -pytest-cov==5.0.0 +pytest-cov==6.0.0 # via -r requirements/test.txt pytest-django==4.9.0 # via -r requirements/test.txt pytest-randomly==3.16.0 # via -r requirements/test.txt +python-dateutil==2.9.0.post0 + # via + # -r requirements/test.txt + # celery python-slugify==8.0.4 # via # -r requirements/test.txt @@ -267,9 +329,9 @@ requests-toolbelt==1.0.0 # via twine rfc3986==2.0.0 # via twine -rich==13.9.3 +rich==13.9.4 # via twine -rpds-py==0.20.0 +rpds-py==0.21.0 # via # -r requirements/test.txt # jsonschema @@ -285,13 +347,14 @@ six==1.16.0 # -r requirements/test.txt # edx-codejail # edx-lint + # python-dateutil snowballstemmer==2.2.0 # via pydocstyle -sqlparse==0.5.1 +sqlparse==0.5.2 # via # -r requirements/test.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/test.txt # code-annotations @@ -308,15 +371,42 @@ twine==5.1.1 typing-extensions==4.12.2 # via # -r requirements/test.txt + # ddtrace # edx-opaque-keys +tzdata==2024.2 + # via + # -r requirements/test.txt + # celery + # kombu urllib3==2.2.3 # via # -r requirements/test.txt # requests # twine -zipp==3.20.2 - # via importlib-metadata +vine==5.1.0 + # via + # -r requirements/test.txt + # amqp + # celery + # kombu +wcwidth==0.2.13 + # via + # -r requirements/test.txt + # prompt-toolkit +wrapt==1.16.0 + # via + # -r requirements/test.txt + # ddtrace + # deprecated +xmltodict==0.14.2 + # via + # -r requirements/test.txt + # ddtrace +zipp==3.21.0 + # via + # -r requirements/test.txt + # importlib-metadata # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.6.0 # via -r requirements/test.txt diff --git a/requirements/scripts.txt b/requirements/scripts.txt index 29520f1..d7aa512 100644 --- a/requirements/scripts.txt +++ b/requirements/scripts.txt @@ -4,6 +4,10 @@ # # make upgrade # +amqp==5.3.1 + # via + # -r requirements/base.txt + # kombu asgiref==3.8.1 # via # -r requirements/base.txt @@ -16,6 +20,12 @@ attrs==24.2.0 # referencing avro==1.12.0 # via confluent-kafka +billiard==4.2.1 + # via + # -r requirements/base.txt + # celery +celery==5.4.0 + # via -r requirements/base.txt certifi==2024.8.30 # via # -r requirements/base.txt @@ -32,13 +42,29 @@ charset-normalizer==3.4.0 click==8.1.7 # via # -r requirements/base.txt + # celery + # click-didyoumean + # click-plugins + # click-repl # code-annotations # edx-django-utils -code-annotations==1.8.0 +click-didyoumean==0.3.1 + # via + # -r requirements/base.txt + # celery +click-plugins==1.1.1 + # via + # -r requirements/base.txt + # celery +click-repl==0.3.0 + # via + # -r requirements/base.txt + # celery +code-annotations==1.8.2 # via # -r requirements/base.txt # edx-toggles -confluent-kafka[avro]==2.6.0 +confluent-kafka[avro]==2.6.1 # via -r requirements/scripts.in cryptography==43.0.3 # via @@ -62,7 +88,7 @@ django-crum==0.7.9 # -r requirements/base.txt # edx-django-utils # edx-toggles -django-waffle==4.1.0 +django-waffle==4.2.0 # via # -r requirements/base.txt # edx-django-utils @@ -83,7 +109,7 @@ drf-jwt==1.19.2 # edx-drf-extensions edx-ccx-keys==1.3.0 # via openedx-events -edx-codejail==3.5.1 +edx-codejail==3.5.2 # via -r requirements/base.txt edx-django-utils==7.0.0 # via @@ -124,11 +150,15 @@ jsonschema-specifications==2024.10.1 # via # -r requirements/base.txt # jsonschema +kombu==5.4.2 + # via + # -r requirements/base.txt + # celery markupsafe==3.0.2 # via # -r requirements/base.txt # jinja2 -newrelic==10.2.0 +newrelic==10.3.0 # via # -r requirements/base.txt # edx-django-utils @@ -138,6 +168,10 @@ pbr==6.1.0 # via # -r requirements/base.txt # stevedore +prompt-toolkit==3.0.48 + # via + # -r requirements/base.txt + # click-repl psutil==6.1.0 # via # -r requirements/base.txt @@ -146,7 +180,7 @@ pycparser==2.22 # via # -r requirements/base.txt # cffi -pyjwt[crypto]==2.9.0 +pyjwt[crypto]==2.10.0 # via # -r requirements/base.txt # drf-jwt @@ -159,6 +193,10 @@ pynacl==1.5.0 # via # -r requirements/base.txt # edx-django-utils +python-dateutil==2.9.0.post0 + # via + # -r requirements/base.txt + # celery python-slugify==8.0.4 # via # -r requirements/base.txt @@ -177,7 +215,7 @@ requests==2.32.3 # -r requirements/base.txt # confluent-kafka # edx-drf-extensions -rpds-py==0.20.0 +rpds-py==0.21.0 # via # -r requirements/base.txt # jsonschema @@ -191,11 +229,12 @@ six==1.16.0 # -r requirements/base.txt # edx-ccx-keys # edx-codejail -sqlparse==0.5.1 + # python-dateutil +sqlparse==0.5.2 # via # -r requirements/base.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/base.txt # code-annotations @@ -209,11 +248,26 @@ typing-extensions==4.12.2 # via # -r requirements/base.txt # edx-opaque-keys +tzdata==2024.2 + # via + # -r requirements/base.txt + # celery + # kombu urllib3==2.2.3 # via # -r requirements/base.txt # requests +vine==5.1.0 + # via + # -r requirements/base.txt + # amqp + # celery + # kombu +wcwidth==0.2.13 + # via + # -r requirements/base.txt + # prompt-toolkit # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.6.0 # via -r requirements/base.txt diff --git a/requirements/test.in b/requirements/test.in index 37a4119..c5dffdf 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -8,3 +8,4 @@ pytest-django # pytest extension for better Django support pytest-randomly # pytest extension for discovering order-sensitive tests code-annotations # provides commands used by the pii_check make target. ddt # data-driven tests +ddtrace # Required for testing datadog_monitoring app and middleware diff --git a/requirements/test.txt b/requirements/test.txt index 117a3c5..e0bfda2 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,6 +4,10 @@ # # make upgrade # +amqp==5.3.1 + # via + # -r requirements/base.txt + # kombu asgiref==3.8.1 # via # -r requirements/base.txt @@ -13,6 +17,14 @@ attrs==24.2.0 # -r requirements/base.txt # jsonschema # referencing +billiard==4.2.1 + # via + # -r requirements/base.txt + # celery +bytecode==0.16.0 + # via ddtrace +celery==5.4.0 + # via -r requirements/base.txt certifi==2024.8.30 # via # -r requirements/base.txt @@ -29,14 +41,30 @@ charset-normalizer==3.4.0 click==8.1.7 # via # -r requirements/base.txt + # celery + # click-didyoumean + # click-plugins + # click-repl # code-annotations # edx-django-utils -code-annotations==1.8.0 +click-didyoumean==0.3.1 + # via + # -r requirements/base.txt + # celery +click-plugins==1.1.1 + # via + # -r requirements/base.txt + # celery +click-repl==0.3.0 + # via + # -r requirements/base.txt + # celery +code-annotations==1.8.2 # via # -r requirements/base.txt # -r requirements/test.in # edx-toggles -coverage[toml]==7.6.4 +coverage[toml]==7.6.7 # via pytest-cov cryptography==43.0.3 # via @@ -44,6 +72,10 @@ cryptography==43.0.3 # pyjwt ddt==1.7.2 # via -r requirements/test.in +ddtrace==2.16.4 + # via -r requirements/test.in +deprecated==1.2.15 + # via opentelemetry-api # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt @@ -59,7 +91,7 @@ django-crum==0.7.9 # -r requirements/base.txt # edx-django-utils # edx-toggles -django-waffle==4.1.0 +django-waffle==4.2.0 # via # -r requirements/base.txt # edx-django-utils @@ -78,7 +110,7 @@ drf-jwt==1.19.2 # via # -r requirements/base.txt # edx-drf-extensions -edx-codejail==3.5.1 +edx-codejail==3.5.2 # via -r requirements/base.txt edx-django-utils==7.0.0 # via @@ -93,10 +125,14 @@ edx-opaque-keys==2.11.0 # edx-drf-extensions edx-toggles==5.2.0 # via -r requirements/base.txt +envier==0.6.1 + # via ddtrace idna==3.10 # via # -r requirements/base.txt # requests +importlib-metadata==8.5.0 + # via opentelemetry-api iniconfig==2.0.0 # via pytest jinja2==3.1.4 @@ -109,15 +145,21 @@ jsonschema-specifications==2024.10.1 # via # -r requirements/base.txt # jsonschema +kombu==5.4.2 + # via + # -r requirements/base.txt + # celery markupsafe==3.0.2 # via # -r requirements/base.txt # jinja2 -newrelic==10.2.0 +newrelic==10.3.0 # via # -r requirements/base.txt # edx-django-utils -packaging==24.1 +opentelemetry-api==1.28.2 + # via ddtrace +packaging==24.2 # via pytest pbr==6.1.0 # via @@ -125,6 +167,12 @@ pbr==6.1.0 # stevedore pluggy==1.5.0 # via pytest +prompt-toolkit==3.0.48 + # via + # -r requirements/base.txt + # click-repl +protobuf==5.28.3 + # via ddtrace psutil==6.1.0 # via # -r requirements/base.txt @@ -133,7 +181,7 @@ pycparser==2.22 # via # -r requirements/base.txt # cffi -pyjwt[crypto]==2.9.0 +pyjwt[crypto]==2.10.0 # via # -r requirements/base.txt # drf-jwt @@ -151,12 +199,16 @@ pytest==8.3.3 # pytest-cov # pytest-django # pytest-randomly -pytest-cov==5.0.0 +pytest-cov==6.0.0 # via -r requirements/test.in pytest-django==4.9.0 # via -r requirements/test.in pytest-randomly==3.16.0 # via -r requirements/test.in +python-dateutil==2.9.0.post0 + # via + # -r requirements/base.txt + # celery python-slugify==8.0.4 # via # -r requirements/base.txt @@ -174,7 +226,7 @@ requests==2.32.3 # via # -r requirements/base.txt # edx-drf-extensions -rpds-py==0.20.0 +rpds-py==0.21.0 # via # -r requirements/base.txt # jsonschema @@ -187,11 +239,12 @@ six==1.16.0 # via # -r requirements/base.txt # edx-codejail -sqlparse==0.5.1 + # python-dateutil +sqlparse==0.5.2 # via # -r requirements/base.txt # django -stevedore==5.3.0 +stevedore==5.4.0 # via # -r requirements/base.txt # code-annotations @@ -204,12 +257,36 @@ text-unidecode==1.3 typing-extensions==4.12.2 # via # -r requirements/base.txt + # ddtrace # edx-opaque-keys +tzdata==2024.2 + # via + # -r requirements/base.txt + # celery + # kombu urllib3==2.2.3 # via # -r requirements/base.txt # requests +vine==5.1.0 + # via + # -r requirements/base.txt + # amqp + # celery + # kombu +wcwidth==0.2.13 + # via + # -r requirements/base.txt + # prompt-toolkit +wrapt==1.16.0 + # via + # ddtrace + # deprecated +xmltodict==0.14.2 + # via ddtrace +zipp==3.21.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -setuptools==75.2.0 +setuptools==75.6.0 # via -r requirements/base.txt diff --git a/setup.py b/setup.py index 3b29fa9..f6cbc94 100644 --- a/setup.py +++ b/setup.py @@ -164,9 +164,11 @@ def is_requirement(line): "arch_experiments = edx_arch_experiments.apps:EdxArchExperimentsConfig", "config_watcher = edx_arch_experiments.config_watcher.apps:ConfigWatcher", "codejail_service = edx_arch_experiments.codejail_service.apps:CodejailService", + "datadog_monitoring = edx_arch_experiments.datadog_monitoring.apps:DatadogMonitoring", ], "cms.djangoapp": [ "config_watcher = edx_arch_experiments.config_watcher.apps:ConfigWatcher", + "datadog_monitoring = edx_arch_experiments.datadog_monitoring.apps:DatadogMonitoring", ], }, )