
    gh6                        S SK r S SKJr  S SKJr  S SKJr  S SKJr  \(       a  S SKJ	r	J
r
JrJrJr   S SKrS SKJrJr  S SKJr  S S	KJr  S S
KJr   " S S\R0                  \R2                  5      rg! \ a	    \" S5      ef = f)    N)OP)DidNotEnable)SPAN_ORIGIN)TYPE_CHECKING)AnyCallableIteratorIterableUnion)ClientCallDetailsCall)_UnaryOutcome)UnaryStreamCall)Messagezgrpcio is not installedc                   4    \ rS rSrSrS rS r\S 5       rSr	g)ClientInterceptor   Fc                 x   UR                   n[        R                  " [        R                  SU-  [
        S9 nUR                  SS5        UR                  SU5        U R                  U5      nU" X#5      nUR                  SUR                  5       R                  5        UsS S S 5        $ ! , (       d  f       g = f)Nzunary unary call to %sopnameorigintypezunary unarymethodcode)
r   
sentry_sdk
start_spanr   GRPC_CLIENTr   set_data/_update_client_call_details_metadata_from_scoper   r   selfcontinuationclient_call_detailsrequestr   spanresponses          f/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sentry_sdk/integrations/grpc/client.pyintercept_unary_unary'ClientInterceptor.intercept_unary_unary   s    $++""~~)F2
 MM&-0MM(F+"&"V"V## $$7AHMM&(--/"6"67
 
 
s   A)B++
B9c                 $   UR                   n[        R                  " [        R                  SU-  [
        S9 nUR                  SS5        UR                  SU5        U R                  U5      nU" X#5      nUsS S S 5        $ ! , (       d  f       g = f)Nzunary stream call to %sr   r   zunary streamr   )r   r   r   r   r   r   r   r    r!   s          r(   intercept_unary_stream(ClientInterceptor.intercept_unary_stream/   s    $++""~~*V3
 MM&.1MM(F+"&"V"V## $#H %
 
 
s   ?B
Bc           	      |   U R                   (       a  [        U R                   5      O/ n[        R                  " 5       R	                  5        H  u  nnUR                  X#45        M     [        R                  R                  U R                  U R                  UU R                  U R                  U R                  S9n U $ )N)r   timeoutmetadatacredentialswait_for_readycompression)r0   listr   get_current_scopeiter_trace_propagation_headersappendgrpc_interceptor_ClientCallDetailsr   r/   r1   r2   r3   )r$   r0   keyvalues       r(   r    AClientInterceptor._update_client_call_details_metadata_from_scopeG   s     3F2N2ND$--.TV 	 ))+JJL
OOSL) M #//BB&--'//+77.==+77 C 
 #"     N)
__name__
__module____qualname____firstlineno___is_interceptedr)   r,   staticmethodr    __static_attributes__r?   r>   r(   r   r      s'     O*0 # #r>   r   )r   sentry_sdk.constsr   sentry_sdk.integrationsr   #sentry_sdk.integrations.grpc.constsr   typingr   r   r   r	   r
   r   r8   r   r   grpc._interceptorr   grpc.aio._interceptorr   google.protobuf.messager   ImportErrorUnaryUnaryClientInterceptorUnaryStreamClientInterceptorr   r?   r>   r(   <module>rQ      sk       0 ;  ??2,/5/
G#$$d&G&GG#	  2
0
112s   A2 2B