Ë
    S>{i�  ã                   ó¢   — d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl	m
Z
 erd dlmZmZ d dlmZmZmZmZ d	gZ G d
„ d	e
«      Zd„ Zd„ Zd„ Zy)é    )Úabsolute_importN)ÚHub)ÚMYPY)ÚOP)ÚIntegration)ÚAddressFamilyÚ
SocketKind)ÚTupleÚOptionalÚUnionÚListÚSocketIntegrationc                   ó    — e Zd ZdZed„ «       Zy)r   Úsocketc                  ó,   — t        «        t        «        y)zs
        patches two of the most used functions of socket: create_connection and getaddrinfo(dns resolver)
        N)Ú_patch_create_connectionÚ_patch_getaddrinfo© ó    ú\/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sentry_sdk/integrations/socket.pyÚ
setup_oncezSocketIntegration.setup_once   s   € ô 	!Ô"ÜÕr   N)Ú__name__Ú
__module__Ú__qualname__Ú
identifierÚstaticmethodr   r   r   r   r   r      s   „ Ø€Jàñó ñr   c                 ó`   — 	 | j                  «       } | ›d|›�}|S # t        t        f$ r Y Œw xY w)Nú:)ÚdecodeÚUnicodeDecodeErrorÚAttributeError)ÚhostÚportÚdescriptions      r   Ú_get_span_descriptionr%      s=   € ðØ�{‰{‹}ˆò "¡4Ð(€KàÐøô ¤Ð/ò Ùðús   ‚ ›-¬-c                  óh   ‡— t         j                  Št         j                  d fˆfd„	} | t         _        y )Nc                 ót  •— t         j                  }|j                  t        «      € ‰| ||¬«      S |j	                  t
        j                  t        | d   | d   «      ¬«      5 }|j                  d| «       |j                  d|«       |j                  d|«        ‰| ||¬«      cd d d «       S # 1 sw Y   y xY w)N)ÚaddressÚtimeoutÚsource_addressr   é   ©Úopr$   r(   r)   r*   )	r   ÚcurrentÚget_integrationr   Ú
start_spanr   ÚSOCKET_CONNECTIONr%   Úset_data)r(   r)   r*   ÚhubÚspanÚreal_create_connections        €r   Úcreate_connectionz3_patch_create_connection.<locals>.create_connection.   s¶   ø€ ô �k‰kˆØ×ÑÔ0Ó1Ð9Ù)Ø¨Àôð ð �^‰^Ü×#Ñ#Ü-¨g°a©j¸'À!¹*ÓEð ó 
ð 
	ð Ø�M‰M˜) WÔ-Ø�M‰M˜) WÔ-Ø�M‰MÐ*¨NÔ;á)Ø¨Àô÷
	÷ 
	ò 
	ús   Á#AB.Â.B7)r   r6   Ú_GLOBAL_DEFAULT_TIMEOUT)r6   r5   s    @r   r   r   *   s,   ø€ ä#×5Ñ5Ðô ×.Ñ.Øõð0  1„FÕr   c                  óH   ‡— t         j                  Šdˆfd„	} | t         _        y )Nc           	      óL  •— t         j                  }|j                  t        «      € ‰| |||||«      S |j	                  t
        j                  t        | |«      ¬«      5 }|j                  d| «       |j                  d|«        ‰| |||||«      cd d d «       S # 1 sw Y   y xY w)Nr,   r"   r#   )	r   r.   r/   r   r0   r   Ú
SOCKET_DNSr%   r2   )	r"   r#   ÚfamilyÚtypeÚprotoÚflagsr3   r4   Úreal_getaddrinfos	           €r   Úgetaddrinfoz'_patch_getaddrinfo.<locals>.getaddrinfoM   sŸ   ø€ ä�k‰kˆØ×ÑÔ0Ó1Ð9Ù# D¨$°¸¸eÀUÓKÐKà�^‰^Ü�}‰}Ô*?ÀÀdÓ*Kð ó 
ð 	LàØ�M‰M˜& $Ô'Ø�M‰M˜& $Ô'á# D¨$°¸¸eÀUÓK÷	L÷ 	Lò 	Lús   Á1BÂB#)r   r   r   r   )r   r@   )r@   r?   s    @r   r   r   I   s   ø€ ä×)Ñ)ÐõLð %„FÕr   )Ú
__future__r   r   Ú
sentry_sdkr   Úsentry_sdk._typesr   Úsentry_sdk.constsr   Úsentry_sdk.integrationsr   r   r	   Útypingr
   r   r   r   Ú__all__r   r%   r   r   r   r   r   ú<module>rH      sF   ðÝ &ã Ý Ý "Ý  Ý /áß0ß3Ó3àÐ
€ô
˜ô 
ò
ò1ó>%r   