コード例 #1
0
def instrument_django_core_handlers_base(module):

    # Attach a post function to load_middleware() method of
    # BaseHandler to trigger insertion of browser timing
    # middleware and wrapping of middleware for timing etc.

    wrap_post_function(module, 'BaseHandler.load_middleware',
                       insert_and_wrap_middleware)
コード例 #2
0
def instrument_django_core_handlers_base(module):

    # Attach a post function to load_middleware() method of
    # BaseHandler to trigger insertion of browser timing
    # middleware and wrapping of middleware for timing etc.

    wrap_post_function(module, 'BaseHandler.load_middleware',
                       insert_and_wrap_middleware)

    if six.PY3 and hasattr(module.BaseHandler, 'get_response_async'):
        wrap_function_wrapper(module, 'BaseHandler.get_response_async',
                              _nr_wrapper_BaseHandler_get_response_async_)

    wrap_function_wrapper(module, 'BaseHandler.get_response',
                          _nr_wrapper_BaseHandler_get_response_)