
    lh                         d dl mZmZmZmZ d dlmZmZmZm	Z	m
Z
mZ d dlmZ d dlZd dlmZ d dlmZ  G d d      Z G d	 d
ee      Z G d dee      Zy)    )CallableUnionAsyncIterableAny)UnaryUnaryClientInterceptorUnaryStreamClientInterceptorClientCallDetailsUnaryUnaryCallUnaryStreamCallMetadata)MessageN)OP)SPAN_ORIGINc                   &    e Zd Zededefd       Zy)ClientInterceptorclient_call_detailsreturnc                 r   | j                   | j                  t                     } nIt        | j                   t              s/| j                  t        j                  | j                               } t        j                         j                         D ]!  \  }}| j                   j                  ||       # | S )N)metadata)	r   _replacer   
isinstance
from_tuple
sentry_sdkget_current_scopeiter_trace_propagation_headersadd)r   keyvalues      y/var/www/pru.catia.catastroantioquia-mas.com/tasa/lib/python3.12/site-packages/sentry_sdk/integrations/grpc/aio/client.py/_update_client_call_details_metadata_from_scopezAClientInterceptor._update_client_call_details_metadata_from_scope   s     ''/"5">">
">"S/88(C #6">">!,,-@-I-IJ #? # ))+JJL	9 
((,,S%8		9
 #"    N)__name__
__module____qualname__staticmethodr	   r     r!   r   r   r      s$    #.#	# #r!   r   c            
       <    e Zd Zdeeegef   dededeeef   fdZy)!SentryUnaryUnaryClientInterceptorcontinuationr   requestr   c                   K   |j                   }t        j                  t        j                  d|j                         z  t              5 }|j                  dd       |j                  d|       | j                  |      } |||       d {   }|j                          d {   }|j                  d|j                         |cd d d        S 7 C7 -# 1 sw Y   y xY ww)Nzunary unary call to %sopnameorigintypezunary unarymethodcode)r1   r   
start_spanr   GRPC_CLIENTdecoder   set_datar    r2   r.   )selfr)   r   r*   r1   spanresponsestatus_codes           r   intercept_unary_unaryz7SentryUnaryUnaryClientInterceptor.intercept_unary_unary(   s      %++""~~)FMMO;
 	 MM&-0MM(F+"&"V"V## **=wGGH (/KMM&+"2"23!	 	 H/	 	sC   AC 
ACCC$C%!C
C CCCC N)	r"   r#   r$   r   r	   r   r
   r   r;   r&   r!   r   r(   r(   '   sG     17;^KL / 	
 
~w&	'r!   r(   c            
       B    e Zd Zdeeegef   dededeee	   ef   fdZ
y)"SentryUnaryStreamClientInterceptorr)   r   r*   r   c                 X  K   |j                   }t        j                  t        j                  d|j                         z  t              5 }|j                  dd       |j                  d|       | j                  |      } |||       d {   }|cd d d        S 7 # 1 sw Y   y xY ww)Nzunary stream call to %sr,   r0   zunary streamr1   )	r1   r   r3   r   r4   r5   r   r6   r    )r7   r)   r   r*   r1   r8   r9   s          r   intercept_unary_streamz9SentryUnaryStreamClientInterceptor.intercept_unary_streamF   s      %++""~~*V]]_<
 	 MM&.1MM(F+"&"V"V## **=wGGH !	 	 H	 	s1   AB*
ABBB
B*BB'#B*N)r"   r#   r$   r   r	   r   r   r   r   r   r?   r&   r!   r   r=   r=   C   sL     17;_LM / 	
 
}S!?2	3r!   r=   )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(   r=   r&   r!   r   <module>rE      sM    6 6  ,    ;# #*(9;V 83r!   