U '�7`8 � @ s� d dl mZ d dlmZmZmZmZmZ d dlZd dl m Z d dlmZ ddl mZ ddlmZ er�d d lmZ dd lmZ eddd �ZG dd� dee �ZdZG dd� d�Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G dd� d��Zejdddd�G d d!� d!��Z ejdddd�G d"d#� d#��Z!ejdddd�G d$d%� d%��Z"ejdddd�G d&d'� d'��Z#ejdddd�G d(d)� d)��Z$ejdddd�G d*d+� d+��Z%ejdddd�G d,d-� d-��Z&ejdddd�G d.d/� d/��Z'ejdddd�G d0d1� d1��Z(G d2d3� d3�Z)dS )4� )�SimpleNamespace)� TYPE_CHECKING� Awaitable�Optional�Type�TypeVarN)�CIMultiDict)�URL� )�ClientResponse)�Signal)�Protocol)� ClientSession�_ParamT_contraT)Z contravariantc @ s$ e Zd Zeeeed d�dd�ZdS )�_SignalCallbackN)�_SignalCallback__client_session�!_SignalCallback__trace_config_ctx�_SignalCallback__params�returnc C s d S �N� )�selfr r r r r �B/opt/alt/python38/lib64/python3.8/site-packages/aiohttp/tracing.py�__call__ s z_SignalCallback.__call__)�__name__� __module__�__qualname__r r r r r r r r r r s �r )�TraceConfig�TraceRequestStartParams�TraceRequestEndParams�TraceRequestExceptionParams� TraceConnectionQueuedStartParams�TraceConnectionQueuedEndParams� TraceConnectionCreateStartParams�TraceConnectionCreateEndParams�TraceConnectionReuseconnParams�TraceDnsResolveHostStartParams�TraceDnsResolveHostEndParams�TraceDnsCacheHitParams�TraceDnsCacheMissParams�TraceRequestRedirectParams�TraceRequestChunkSentParams� TraceResponseChunkReceivedParamsc @ sZ e Zd ZdZefee dd�dd�Zd9ee ed�dd�Zdd �d d�Z e dd �d d��Ze dd �dd��Ze dd �dd��Z e dd �dd��Ze dd �dd��Ze dd �dd��Ze dd �dd ��Ze d!d �d"d#��Ze d$d �d%d&��Ze d'd �d(d)��Ze d*d �d+d,��Ze d-d �d.d/��Ze d0d �d1d2��Ze d3d �d4d5��Ze d6d �d7d8��ZdS ):r zJFirst-class used to trace requests launched via ClientSession objects.N)�trace_config_ctx_factoryr c C s� t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _t | �| _ t | �| _ t | �| _t | �| _t | �| _ t | �| _t | �| _|| _d S r )r �_on_request_start�_on_request_chunk_sent�_on_response_chunk_received�_on_request_end�_on_request_exception�_on_request_redirect�_on_connection_queued_start�_on_connection_queued_end�_on_connection_create_start�_on_connection_create_end�_on_connection_reuseconn�_on_dns_resolvehost_start�_on_dns_resolvehost_end�_on_dns_cache_hit�_on_dns_cache_miss�_trace_config_ctx_factory)r r- r r r �__init__4 s\ ���������������zTraceConfig.__init__)�trace_request_ctxr c C s | j |d�S )z( Return a new trace_config_ctx instance )r? )r= )r r? r r r �trace_config_ctxg s zTraceConfig.trace_config_ctx�r c C s� | j �� | j�� | j�� | j�� | j�� | j�� | j�� | j�� | j �� | j �� | j�� | j�� | j �� | j�� | j�� d S r )r. �freezer/ r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r: r; r<