Skip to content

Commit

Permalink
fixup! code review feedback
Browse files Browse the repository at this point in the history
- add min constraint edx-django-utils>=7.1.0
- change changelog date and fix typo
- * add unreleased changelog to 6.0.0
- add request argument
  • Loading branch information
robrap committed Dec 5, 2024
1 parent d08d9f9 commit 57ef2d5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ Change Log
Unreleased
~~~~~~~~~~
Added
-----
* Adds search script datadog_search.py, for searching Datadog monitors and dashboards.

[6.0.0] - 2024-11-05
[6.0.0] - 2024-12-05
~~~~~~~~~~~~~~~~~~~~
Removed
-------
- Removes CodeOwnerMonitoringMiddleware, in favor of using new signals semt from edx-django-utils's MonitoringSupportMiddleware.
- Removes CodeOwnerMonitoringMiddleware, in favor of using new signals sent from edx-django-utils's MonitoringSupportMiddleware.

Added
-----
* Adds search script datadog_search.py, for searching Datadog monitors and dashboards.

[5.1.0] - 2024-11-21
~~~~~~~~~~~~~~~~~~~~
Expand Down
12 changes: 6 additions & 6 deletions edx_arch_experiments/datadog_monitoring/signals/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,24 @@


@receiver(monitoring_support_process_response, dispatch_uid=f"datadog_monitoring_support_process_response")
def datadog_monitoring_support_process_response(sender, **kwargs):
def datadog_monitoring_support_process_response(sender, request=None, **kwargs):
"""
Adds datadog monitoring at monitoring process response time.
"""
if 'request' in kwargs:
set_code_owner_attribute(kwargs['request'])
if request:
set_code_owner_attribute(request)
else:
log.warning('monitoring_support_process_response sent without '
'expected parameter: request.')


@receiver(monitoring_support_process_exception, dispatch_uid=f"datadog_monitoring_support_process_exception")
def datadog_monitoring_support_process_exception(sender, **kwargs):
def datadog_monitoring_support_process_exception(sender, request=None, **kwargs):
"""
Adds datadog monitoring at monitoring process exception time.
"""
if 'request' in kwargs:
set_code_owner_attribute(kwargs['request'])
if request:
set_code_owner_attribute(request)
else:
log.warning('monitoring_support_process_exception sent without '
'expected parameter: request.')
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

celery # Asynchronous task execution library
Django # Web application framework
edx_django_utils # Basic utilities for plugins, monitoring, and more
edx-django-utils>=7.1.0 # 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
Expand Down

0 comments on commit 57ef2d5

Please sign in to comment.