Closed
Description
NetBox version
v4.1.8
Feature type
Change to existing functionality
Triage priority
N/A
Proposed functionality
NetBox currently employs its event_tracking()
context manager to process events triggered by a request, e.g. for change change logging. This function is invoked explicitly by the CoreMiddleware
class.
Instead of calling this function directly, we can register it within NetBox's application registry, and consult the registry for all registered request processors whenever necessary, including within the middleware as well as for other purposes (such as running a background job).
Use case
This approach will enable to us to dynamically register additional request processors, such as those which may be introduced by plugins, without the need for explicit configuration. #18136 raises one such use case.
Database changes
N/A
External dependencies
N/A