
    gh                         S SK JrJrJrJr  S SKJrJrJrJ	r	J
r
Jr  S SKJr  S SKrS SKJr  S SKJr   " S S5      r " S	 S
\\5      r " S S\\5      rg)    )CallableUnionAsyncIterableAny)UnaryUnaryClientInterceptorUnaryStreamClientInterceptorClientCallDetailsUnaryUnaryCallUnaryStreamCallMetadata)MessageN)OP)SPAN_ORIGINc                   0    \ rS rSr\S\S\4S j5       rSrg)ClientInterceptor   client_call_detailsreturnc                 x   U R                   c  U R                  [        5       S9n OL[        U R                   [        5      (       d-  U R                  [        R                  " U R                   5      S9n [
        R                  " 5       R                  5        H!  u  nnU R                   R                  X5        M#     U $ )N)metadata)	r   _replacer   
isinstance
from_tuple
sentry_sdkget_current_scopeiter_trace_propagation_headersadd)r   keyvalues      j/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sentry_sdk/integrations/grpc/aio/client.py/_update_client_call_details_metadata_from_scopeAClientInterceptor._update_client_call_details_metadata_from_scope   s     ''/"5">">
">"S/88(CC #6">">!,,-@-I-IJ #? # ))+JJL
((,,S8 M""     N)__name__
__module____qualname____firstlineno__staticmethodr	   r!   __static_attributes__r$   r#   r    r   r      s$    #.#	# #r#   r   c            
       F    \ rS rSrS\\\/\4   S\S\S\\\4   4S jr	Sr
g)	!SentryUnaryUnaryClientInterceptor'   continuationr   requestr   c                   #    UR                   n[        R                  " [        R                  SUR                  5       -  [        S9 nUR                  SS5        UR                  SU5        U R                  U5      nU" X#5      I S h  vN nUR                  5       I S h  vN nUR                  SUR                  5        UsS S S 5        $  NC N-! , (       d  f       g = f7f)Nzunary unary call to %sopnameorigintypezunary unarymethodcode)r6   r   
start_spanr   GRPC_CLIENTdecoder   set_datar!   r7   r3   )selfr.   r   r/   r6   spanresponsestatus_codes           r    intercept_unary_unary7SentryUnaryUnaryClientInterceptor.intercept_unary_unary(   s      %++""~~)FMMO;
 MM&-0MM(F+"&"V"V## **=GGH (/KMM&+"2"23!
 
 H/
 
sC   AC"AC	C
C!C"!C
C"CC
CC"r$   N)r%   r&   r'   r(   r   r	   r   r
   r   r@   r*   r$   r#   r    r,   r,   '   sG     17;^KL / 	
 
~w&	'r#   r,   c            
       L    \ rS rSrS\\\/\4   S\S\S\\	\
   \4   4S jrSrg)	"SentryUnaryStreamClientInterceptorC   r.   r   r/   r   c                 \  #    UR                   n[        R                  " [        R                  SUR                  5       -  [        S9 nUR                  SS5        UR                  SU5        U R                  U5      nU" X#5      I S h  vN nUsS S S 5        $  N! , (       d  f       g = f7f)Nzunary stream call to %sr1   r5   zunary streamr6   )	r6   r   r8   r   r9   r:   r   r;   r!   )r<   r.   r   r/   r6   r=   r>   s          r    intercept_unary_stream9SentryUnaryStreamClientInterceptor.intercept_unary_streamF   s      %++""~~*V]]_<
 MM&.1MM(F+"&"V"V## **=GGH !
 
 H
 
s1   AB,AB	B
B
B,B
B)%B,r$   N)r%   r&   r'   r(   r   r	   r   r   r   r   r   rF   r*   r$   r#   r    rC   rC   C   sL     17;_LM / 	
 
}S!?2	3r#   rC   )typingr   r   r   r   grpc.aior   r   r	   r
   r   r   google.protobuf.messager   r   sentry_sdk.constsr   #sentry_sdk.integrations.grpc.constsr   r   r,   rC   r$   r#   r    <module>rM      sM    6 6  ,    ;# #*(9;V 83r#   