-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add monitoring signals for plugins (#467)
Adds signals monitoring_support_process_request, monitoring_support_process_response, and monitoring_support_process_exception to the MonitoringSupportMiddleware to enable plugging in monitoring capabilities.
- Loading branch information
Showing
7 changed files
with
131 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
""" | ||
Signals defined to support monitoring plugins. | ||
Placing signals in this file (vs alternatives like /internal, or | ||
signals/signals.py) provides a good public api for these signals. | ||
""" | ||
import django.dispatch | ||
|
||
# The MonitoringSupportMiddleware sends these signals to enable plugging in | ||
# outside monitoring capabilities. This is a useful capability because the | ||
# MonitoringSupportMiddleware should be available in all Open edX services, | ||
# and should be one of the first middleware (after RequestCacheMiddleware), | ||
# allowing it access to monitor most requests (even those that fail or | ||
# respond early in other middleware). | ||
monitoring_support_process_request = django.dispatch.Signal() | ||
monitoring_support_process_response = django.dispatch.Signal() | ||
monitoring_support_process_exception = django.dispatch.Signal() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters