def _after(self, response):
<EOL>if getattr(request, '<STR_LIT>', False):<EOL><INDENT>return response<EOL><DEDENT>duration = None<EOL>if getattr(request, '<STR_LIT>', None):<EOL><INDENT>duration = monotonic() - request._tracy_start_time<EOL><DEDENT>trace_id = None<EOL>if getattr(request, '<STR_LIT>', None):<EOL><INDENT>trace_id = request._tracy_id<EOL>response.headers[trace_header_id] = trace_id<EOL><DEDENT>trace_client = None<EOL>if getattr(request, '<STR_LIT>', None):<EOL><INDENT>trace_client = request._tracy_client<EOL><DEDENT>d = {'<STR_LIT>': response.status_code,<EOL>'<STR_LIT:url>': request.base_url,<EOL>'<STR_LIT>': request.remote_addr,<EOL>'<STR_LIT>': trace_client,<EOL>'<STR_LIT>': trace_id,<EOL>'<STR_LIT>': duration}<EOL>logger.info(None, extra=d)<EOL>return response<EOL>
Calculates the request duration, and adds a transaction
        ID to the header.