def __call__(self, request):
        """
        Wrap a single incoming request with start and stop calls.
        This will start timing, but relies on the process_view callback to
        capture more details about what view was really called, and other
        similar info.

        If process_view isn't called, then the request will not
        be recorded.  This can happen if a middleware further along the stack
        doesn't call onward, and instead returns a response directly.
        """

        tr = TrackedRequest.instance()
        tr.mark_real_request()

        # This operation name won't be recorded unless changed later in
        # process_view
        operation = "Unknown"
        tr.start_span(operation=operation)
        try:
            response = self.get_response(request)
        finally:
            tr.stop_span()
        return response
def __call__ ( self , request ) : tr = TrackedRequest . instance ( ) tr . mark_real_request ( ) operation = "Unknown" tr . start_span ( operation = operation ) try : response = self . get_response ( request ) finally : tr . stop_span ( ) return response
Wrap a single incoming request with start and stop calls.
        This will start timing, but relies on the process_view callback to
        capture more details about what view was really called, and other
        similar info.

        If process_view isn't called, then the request will not
        be recorded.  This can happen if a middleware further along the stack
        doesn't call onward, and instead returns a response directly.