
    gh̗                     Z   S SK r S SKrS SKrS SKrS SKJr  S SKJrJr  S SKJ	r	  S SK
JrJrJrJrJr  S SKrS SKrS SKJrJr  S SKJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#  S SK$J%r%  S S	K&J'r'  S S
K(J)r)J*r*  S SK+J,r,J-r-J.r.J/r/J0r0J1r1  S SK2J3r3J4r4  S SK5J6r6  S SK7J8r8  S SK9J:r:  S SK;J<r<  S SK=J>r>J?r?J@r@  S SKAJBrB  S SKCJDrD  \(       ag  S SK
JErE  S SK
JFrF  S SK
JGrG  S SK
JHrH  S SK
JIrI  S SK
JJrJ  S SK
JKrK  S SKLJMrMJNrNJOrOJPrP  S SK2JQrQ  S SKRJSrS  S SKTJUrU  S SKVJWrW  S S KXJYrY  S S!K(JZrZ  S S"K[J\r\  \K" S#\QS$9r]\" S%5      r^S&\0S'\0S(./S).r_S* r` \arb " S+ S,5      re " S- S.\e5      rf " S/ S0\e5      rgS S1K
Jr  \(       a   " S2 S3\1\\h\E4   5      ri " S4 S5\1\g5      rjgS6 " 5       riS7 " 5       rjg! \c a    \drb Nff = f)8    N)Mapping)datetimetimezone)import_module)TYPE_CHECKINGListDictcastoverload)PY37check_uwsgi_thread_support)AnnotatedValue
ContextVarcapture_internal_exceptionscurrent_stacktraceenv_to_boolformat_timestampget_sdk_nameget_type_nameget_default_releasehandle_in_app	is_geventloggerget_before_send_loghas_logs_enabled)	serialize)trace)BaseHttpTransportmake_transport)SPANDATADEFAULT_MAX_VALUE_LENGTHDEFAULT_OPTIONSINSTRUMENTERVERSIONClientConstructor)_DEFAULT_INTEGRATIONSsetup_integrations)DedupeIntegration)SessionFlusher)Envelope)setup_continuous_profiler)has_profiling_enabledProfilesetup_profiler)EventScrubber)Monitor)Any)Callable)Optional)Sequence)Type)Union)TypeVar)EventHintSDKInfoLog)IntegrationMetricsAggregator)Scope)Session)SpotlightClient)	Transport
LogBatcherI)boundclient_init_debugzsentry.pythonzpypi:sentry-sdk)nameversion)rH   rI   packagesc                  D   U (       a/  [        U S   [        [        45      (       d  U S   c  U S   nU SS  n OS n[        U 5      S:  a  [	        S5      e[        [        5      n[        U 0 UD6nUb  UR                  S5      c  X$S'   UR                  5        H  u  pVXS;  a  [	        SU< 35      eXcU'   M     US   c"  [        R                  R                  S5      US'   US   c  [        5       US'   US   c+  [        R                  R                  S	5      =(       d    S
US'   US   c3  [        [        R                  R                  S5      SS9=(       d    SUS'   US   c-  [        [        S5      (       a  [        R                  " 5       US'   US   c  [         R"                  US'   US   c   [        R$                  " 5       nXsS'   US   SL a  US   c  SUS'   US   c  [)        US   c  SOUS   S9US'   US   (       a3  [        US   [*        5      (       d  [,        R.                  " S5        S US'   US   c3  [        [        R                  R                  S5      SS9=(       d    SUS'   US   b  [0        R2                  " S[4        SS 9  U$ ! [&         a    S n Nf = f)!Nr      z+Only single positional argument is expecteddsnzUnknown option 
SENTRY_DSNreleaseenvironmentSENTRY_ENVIRONMENT
productiondebugSENTRY_DEBUGTstrictFserver_namegethostnameinstrumenterproject_rootenable_tracingtraces_sample_rate      ?event_scrubbersend_default_pii)r_   socket_optionszxIgnoring socket_options because of unexpected format. See urllib3.HTTPConnection.socket_options for the expected format.
keep_aliveSENTRY_KEEP_ALIVEzVThe `enable_tracing` parameter is deprecated. Please use `traces_sample_rate` instead.   )
stacklevel)
isinstancebytesstrlen	TypeErrordictr"   getitemsosenvironr   r   hasattrsocketrX   r#   SENTRYgetcwd	Exceptionr/   listr   warningwarningswarnDeprecationWarning)argskwargsrM   rvoptionskeyvaluerZ   s           T/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sentry_sdk/client.py_get_optionsr   S   s   DGeS\22d1go1gABx
4y1}EFF	o	BD#F#G
7;;u-5mmo
=38993	 & 
%yJJNN<05		)}+-9	- JJNN+?@PL=	'{!"**.."@NWRW7	- WV]%C%C"..0=	.!)00>	.!	 99;L *>	
t#+?(@(H#& 	
#,./7R@R=S 
 

Jr2B/CT$J$J G	
  $	,

':;DIRU 	< 

'd	
 IC  	 L	 s   /J JJc                       \ rS rSrSrSrSS jrS rS r\	S 5       r
S rS	 rS
 rS rS r\(       a  \S 5       r\S 5       rS rS rS rS rS rSrg)
BaseClient   zd
.. versionadded:: 2.0.0

The basic definition of a client that is used for sending data to Sentry.
Nc                 \    Ub  UO[         U l        S U l        S U l        S U l        S U l        g N)r"   r|   	transportmonitormetrics_aggregatorlog_batcher)selfr|   s     r   __init__BaseClient.__init__   s5     *G 	 "&    c                 
    S0 0$ Nr|    r   ry   rz   s      r   __getstate__BaseClient.__getstate__   s    2r   c                     g r   r   r   s      r   __setstate__BaseClient.__setstate__       r   c                     g r   r   r   s    r   rM   BaseClient.dsn   s     r   c                     g)NFr   r   s    r   should_send_default_pii"BaseClient.should_send_default_pii   s    r   c                     g)]
.. versionadded:: 2.0.0

Returns whether the client is active (able to send data to Sentry)
Fr   r   s    r   	is_activeBaseClient.is_active   s     r   c                     g r   r   r   s      r   capture_eventBaseClient.capture_event       r   c                     g r   r   )r   logs     r   _capture_experimental_log$BaseClient._capture_experimental_log   r   r   c                     g r   r   r   s      r   capture_sessionBaseClient.capture_session   r   r   c                     g r   r   r   name_or_classs     r   get_integrationBaseClient.get_integration        r   c                     g r   r   r   s     r   r   r      r   r   c                     g r   r   r   s     r   r   r      r   r   c                     g r   r   r   s      r   closeBaseClient.close   r   r   c                     g r   r   r   s      r   flushBaseClient.flush   r   r   c                     U $ r   r   r   s    r   	__enter__BaseClient.__enter__       r   c                     g r   r   r   exc_type	exc_valuetbs       r   __exit__BaseClient.__exit__   r   r   )r   r   r   r|   r   r   )__name__
__module____qualname____firstlineno____doc__	spotlightr   r   r   propertyrM   r   r   r   r   r   r   r   r   r   r   r   r   __static_attributes__r   r   r   r   r      s     I	    		 
	 
	 
	r   r   c                       \ rS rSrSrSrg)NonRecordingClienti  z
.. versionadded:: 2.0.0

A client that does not send any events to Sentry. This is used as a fallback when the Sentry SDK is not yet initialized.
r   N)r   r   r   r   r   r   r   r   r   r   r     s     	r   r   c                      ^  \ rS rSrSrU 4S jrS rS rS rS r	S r
S	 r\S
 5       rS rS r SS jrS rS r  SS jrS rS r\(       a  \S 5       r\S 5       rS r  SS jr  SS jrS rS rSrU =r$ )_Clienti  a1  
The client is internally responsible for capturing the events and
forwarding them to sentry through the configured transport.  It takes
the client options as keyword arguments and optionally the DSN as first
argument.

Alias of :py:class:`sentry_sdk.Client`. (Was created for better intelisense support)
c                 Z   > [         [        U ]  [        U0 UD6S9  U R	                  5         g )Nr|   )superr   r   get_options
_init_impl)r   ry   rz   	__class__s      r   r   _Client.__init__  s)    gt%k4.J6.J%Kr   c                     SU R                   0$ r   r   r   s    r   r   _Client.__getstate__  s    4<<((r   c                 8    US   U l         U R                  5         g r   )r|   r   )r   states     r   r   _Client.__setstate__"  s    Y'r   c                    U Ha  nSnUS   nUR                  SS5      u  pV [        U5      n[        Xv5      n[        Xv[	        U5      5        [
        R                  " SU5        Mc     g! [         a     UR                  SS5      u  pS[        U5      n[        Xs5      n	[        X5      n[        U	R                  U   5      n
[	        U5      nU
[        [        4;   a  [        U5      n[        XU5        [        XsU	5        [
        R                  " SU5         GM  ! [         a%  n[
        R                  " SUU5         SnA GMA  SnAff = f[         a$  n[
        R                  " SUU5         SnAGMq  SnAff = f)zr
Instruments the functions given in the list `functions_to_trace` with the `@sentry_sdk.tracing.trace` decorator.
Nqualified_name.rL   zEnabled tracing for %szWCan not enable tracing for '%s'. (%s) Please check your `functions_to_trace` parameter.)rsplitr   getattrsetattrr   r   rS   module_not_found_errortype__dict__staticmethodclassmethodrs   ru   )r   functions_to_tracefunction
class_namefunction_qualnamemodule_namefunction_name
module_objfunction_obj	class_objfunction_typetraced_functiones                r   _setup_instrumentation_Client._setup_instrumentation'  se   
 +HJ ()9 :):)A)A#q)I&K' +;7
&zA
53FG57HI + *  /:.@.@a.H+K!.{!;J '
 ?I#*9#DL$(););M)J$KM&+L&9O${(CC*6*GIoFJI>LL!9;LMM  NNq)   m% s=   AA))
E94B"D
E	$E<E9E		E9E44E9c           	      F
  ^  [         R                  S5      nU 4S jn [         R                  T R                  S   5        [	        T R                  5      T l        S T l        T R
                  (       a.  T R                  S   (       a  [        T R
                  5      T l        [        US9T l	        S T l
        T R                  R                  S0 5      nUR                  SS5      (       ae  [        5       (       + =(       d    [        nU(       a,  S	S
KJn  U" U[        UR                  SS5      5      S9T l
        O[         R"                  " S5        S T l        ['        T R                  5      (       a  S	SKJn  U" US9T l        SnT R                  S   U;  a  [-        SR/                  U5      5      eT R                  S   R                  SS5      (       aS  [         R0                  " S5        [2        R4                  T R                  S'   S[6        ;  a  [6        R8                  " S5        [;        T R                  S   T R                  S   T R                  S   T R                  S   S9T l        T R                  R                  S5      nUcE  S[>        R@                  ;   a1  [>        R@                  S   n	[C        U	SS9nUb  UOU	T R                  S'   T R                  R                  S5      (       ap  S	SK"J#n
  U
" T R                  5      T l$        T R                  S   (       d?  S  nST R                  S!'   UT R                  S"'   UT R                  S#'   UT R                  S$'   [K        [M        T R<                  RO                  5       5      5      nU[P        S%'   [         R0                  " S&U5        [S        T R                  5      (       a   [U        T R                  5        O [Y        T R                  [P        US(9  [         R                  U5        T R[                  T R                  R                  S*/ 5      5        T R                  (       d[  T R                  (       dJ  T R$                  (       d9  [S        T R                  5      (       d  []        T R
                  [^        5      (       a  [a        5         g g ! [V         a!  n[         R0                  " S'U5         S nANS nAff = f! [V         a"  n[         R0                  " S)U5         S nAGNS nAff = f! [         R                  U5        f = f)+NFc                 X   > TR                   b  TR                   R                  U 5        g g r   )r   capture_envelope)enveloper   s    r   _capture_envelope-_Client._init_impl.<locals>._capture_envelope^  s$    ~~)//9 *r   rS   enable_backpressure_handling)capture_func_experimentsenable_metricsTr   r=   metric_code_locations)r   enable_code_locationsz:Metrics not supported on Python 3.6 and lower with gevent.rC   )alwaysneversmallmediummax_request_body_sizez:Invalid value for max_request_body_size. Must be one of {}otel_powered_performancezA[OTel] Enabling experimental OTel-powered performance monitoring.rY   zJsentry_sdk.integrations.opentelemetry.integration.OpenTelemetryIntegrationintegrationsdefault_integrationsauto_enabling_integrationsdisabled_integrations)with_defaultswith_auto_enabling_integrationsr  r   SENTRY_SPOTLIGHTrU   )setup_spotlightrM   c                      g)Nr]   r   )_args_kwargss     r   <lambda>$_Client._init_impl.<locals>.<lambda>  s    3r   r_   error_samplertraces_samplerprofiles_samplerrH   zSetting SDK name to '%s'zCan not set up profiler. (%s))sdk_infor   z(Can not set up continuous profiler. (%s)r   )1_client_init_debugrk   setr|   r   r   r   r0   r)   session_flusherr   r   r   sentry_sdk.metricsr>   boolr   infor   r   sentry_sdk._log_batcherrD   
ValueErrorformatrS   r#   OTELr&   appendr'   r	  rm   rn   r   sentry_sdk.spotlightr  r   r   rt   keysSDK_INFOr,   r.   rs   r+   r   re   r   r   )r   	old_debugr   experimentsmetrics_supportedr>   rD   r  spotlight_configspotlight_env_valuer  
sample_allsdk_namer   s   `             r   r   _Client._init_implZ  s,   &**51		:
o	.""4<<#89+DLL9DNDL~~<< >?#*4>>#:DL#1?P#QD &*D#,,**>2>K/66 )2O$;t!$D.?%6.2'OO,CTJ//D+ KKT  $D-->#-;L#M $J!||34<QQ PWW-  ||N+//0JERRW 0</@/@^,`01 *00d !3^,"ll+AB0401 '+ll3J&K!D  $||//<',>"**,L&(jj1C&D##./B4#P  (3 %, [) ||,, A!0!>||E*!>J7;DLL!344>DLL15?DLL!127ADLL!34#D):):)?)?)A$BCH'HVLL3X>$T\\22E"4<<0P-!)%6 ""9-##DLL$4$45I2$NO LL&&$T\\22$..*;<< '(	 =- ! ELL!@!DDE ! PLL!KQOOP ""9-sZ   N%T	 R, T	 S ,
S6ST	 ST	 
T$T;T	 TT	 	T c                     g)r   Tr   r   s    r   r   _Client.is_active  s     r   c                 J    U R                   R                  S5      =(       d    S$ )z
.. versionadded:: 2.0.0

Returns whether the client should send default PII (Personally Identifiable Information) data to Sentry.
r_   F)r|   rk   r   s    r   r   _Client.should_send_default_pii  s     || 23<u<r   c                      U R                   S   $ )z%Returns the configured DSN as string.rM   r   r   s    r   rM   _Client.dsn  s     ||E""r   c                 0   S nS nUR                  S5      c'  [        R                  " [        R                  5      US'   UR                  S5      S:H  nUGb  [        [        [        [        [        [        4      UR                  S/ 5      5      5      nUR                  XU R                  5      nUcZ  U R                  (       aH  U R                  R                  SU(       a  SOSS9  U(       a  U R                  R                  SSUS	-   S
9  g UnU[        [        [        [        [        [        4      UR                  S/ 5      5      5      -
  n	U(       a.  U	S:  a(  U R                  b  U R                  R                  SSU	S
9  UR                  SS5      U	-   n
U
S:  a  Xz-   nUR                   S:  aS  UR                  S0 5      n[#        U[$        5      (       d  UR                  S/ 5      O/ n[        U5      UR                   -   nU(       d  U R                  S   (       aq  SU;  ak  SU;  ae  SU;  a_  ['        5          S[)        U R                  R                  SS5      U R                  R                  S[*        5      S9SSS./0US'   S S S 5        S HQ  nUR                  U5      b  M  U R                  U   c  M)  [        U R                  U   5      R-                  5       X'   MS     UR                  S5      c9  [/        [0        5      n[3        U R4                  R7                  5       5      US'   XS'   UR                  S5      c  SUS'   [9        UU R                  S   U R                  S   U R                  S    5      nUb'  U R                  S!   nU(       a  UR;                  U5        Ub!  [%        UR                  S/ 5      S"U05      US'   Ub!  [%        UR                  S/ 5      S"U05      US'   Ubk  [        S#[=        [        S$U5      U R                  R                  S%5      U R                  R                  S5      U R                  R                  S&5      S'95      nU R                  S(   nUb  Ub  UR                  S5      S:w  a  S n['        5          U" X=(       d    0 5      nS S S 5        Ucl  [>        R@                  " S)5        U R                  (       a  U R                  R                  S(SS9  UR                  S5      (       a  [B        RD                  " 5         UnU R                  S*   nUGb.  UGb*  UR                  S5      S:X  Ga  S n[        [        [        [        [        [        4      UR                  S/ 5      5      5      n['        5          U" X=(       d    0 5      nS S S 5        Uc`  [>        R@                  " S+5        U R                  (       a8  U R                  R                  S(SS,9  U R                  R                  S(SUS	-   S-9  OLU[        UR                  S/ 5      5      -
  n	U	S:  a(  U R                  b  U R                  R                  S(SU	S-9  UnU$ ! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       N= f).N	timestampr   transactionspansevent_processorerrordata_categoryspanrL   )r=  quantityr   _dropped_spansbreadcrumbsvaluesattach_stacktrace	exception
stacktracethreadsinclude_local_variablesTmax_value_length)rG  rH  F)rE  crashedcurrent)rO   rP   rW   distsdkr	  platformpythonin_app_excludein_app_includerZ   r^   rh   r8   zDict[str, Any]r  custom_repr)r  rH  rQ  before_sendzbefore send dropped eventbefore_send_transactionz%before send transaction dropped event)reasonr=  )rT  r=  r?  )#rk   r   nowr   utcrh   r
   r   r	   rg   objectapply_to_eventr|   r   record_lost_eventpop_n_breadcrumbs_truncatedre   r   r   r   r!   striprj   r'  sortedr	  r&  r   scrub_eventr   r   r  r(   reset_last_seen)r   eventhintscopeprevious_total_spansprevious_total_breadcrumbsis_transactionspans_beforeevent_spans_deltadropped_spansrA  rB  r}   r  r^   rR  	new_eventrS  s                      r   _prepare_event_Client._prepare_event  s     $%)"99[!)!)hll!;E+6*m;tDc6k):$;UYYwPR=STUL))%t||DF ~>>NN44)8F}G 5  &88-*0%1A%5 9 
 E&T$sF{+,eii.DE* K +/dnn6P00%Vk 1  "II&6:[HMq '3'C$--1#iir: &k>BB  OOHb1  K%"@"@@ +
 015(E)&,.*<8<8H8H$=t9" 261A1A$68P2"	+ (-'+$i  /$ CCyy~%$,,s*;*G c!2399;
 C 99U#H~H'-d.?.?.D.D.F'GH^$#%L99Z ( (E*LL)*LL)*LL(	
 !\\*:;N**51++		'2&0D(EE'N &1#1		-,u6P.Q$E- 
 )51*.,,*:*:;R*S%)\\%5%56H%I $ 0 0 ?	E ll=1#!		&!]2I,.'zr:	 / 78>>NN44%W 5  99[))%557E"&,,/H"I#/!		&!]2ItDc6k):$;UYYwPR=STUL,.3E:2F	 / CD>>NN44,M 5  NN44,&,!-!1 5  +Sw1K-LL?t~~'ANN44,F[ 5  Ek /.J /.4 /.s%   <AY#Y5Z#
Y25
Z
Zc                    UR                  S5      nUc  gUS   n[        US   5      nUS   R                  < SU< 3nU R                  S    H8  n[	        U[
        5      (       a  Xv:X  d  Xu:X  a    gM&  [        XG5      (       d  M8    g   g)Nexc_infoFr   r   ignore_errorsT)rk   r   r   r|   re   rg   
issubclass)r   r`  ra  rn  r;  error_type_nameerror_full_nameignored_errors           r   _is_ignored_error_Client._is_ignored_error  s    88J''4%-a[%;%;_M!\\/:M --- 3}7W 8X e33 ; r   c                     UR                  S5      S:H  nU(       a  gUS L=(       a    UR                  (       + nU(       a  gU R                  X5      nU(       a  gg)Nr   r8  TF)rk   _should_capturert  )r   r`  ra  rb  re  ignoring_prevents_recursionignored_by_config_options          r   rw  _Client._should_capture  sV     6*m;&+4&7&U@U@U<U#&#'#9#9%#F #r   c                 r   U R                   R                  SS 5      n[        U5      (       a  [        5          U" X5      nS S S 5        OU R                   S   n WS:  =(       a    [        R                  " 5       U:  nU(       a,  U R                  (       a  U R                  R                  SSS9  gg! , (       d  f       Ng= f! [
         a    [        R                  " S5        Sn Ni[         aG    [        U5      (       a  SOSu  pg[        R                  " SU< S	U< S
[        W5      < S35        Sn Nf = f)Nr  sample_rater]   zMThe provided error_sampler raised an error. Defaulting to sampling the event.F)r  returned)r|  containszThe provided  z an invalid value of zJ. The value should be a float or a bool. Defaulting to sampling the event.r;  r<  T)r|   rk   callabler   random	NameErrorr   ru   ri   reprr   rY  )r   r`  ra  r  r|  not_in_sample_rate	parameterverbs           r   _should_sample_error_Client._should_sample_error  s    (($?M"",.+E8 /. ,,}5K	'!,s!2!Uv}}+7U0 ~~00g0VK /.  	'NN_ "' 	' M** .0 I
 NNdD$57 "'	's$   	B1$C 1
B?"D6&AD65D6c                    SnSnS nUR                  S5      =(       d    0 R                  S5      nU(       au  SnU Hm  n[        U[        5      (       a  UR                  =(       d    0 nUR                  S5      n[        U[        5      (       d  MU  UR                  S5      SL d  Mk  Sn  O   UR                  S5      n	UR
                  cs  UR                  S5      =(       d    0 R                  S	5      n
[        U
[        5      (       a  U
O0 nUR                  5        H  u  pUR                  5       S
:X  d  M  Un  O   UR                  U(       a  SOS U	UUR                  U=(       d    U-   S9  g )NFrD  rB  T	mechanismhandleduserrequestheadersz
user-agentrI  )statusr  
user_agenterrors)rk   re   r   r~   r   r  rj   rl   lowerupdater  )r   sessionr`  rI  erroredr  
exceptionsr;  r  r  r  headers_dictkvs                 r   _update_session_from_event"_Client._update_session_from_event  s;    
ii,277A
G#e^44!KK-2E!IIk2	i11immI6NRW6W"G $ yy %yy+1r66yAG&0$&?&?7RL$**,779,!"J -
 	 '9T!>>W%78	 	 	
r   c                 T   [        U=(       d    S5      nU R                  XU5      (       d  gUR                  SS5      nUR                  S5      nUc$  [        R
                  " 5       R                  =US'   nU R                  XU5      nUc  gU(       a  UR                  OSnU(       a  U R                  Xq5        UR                  S5      S:H  nUR                  S5      S:H  n	U(       d  U	(       d  U R                  X5      (       d  gUR                  S5      n
UR                  S	0 5      R                  S
5      =(       d    0 nUR                  S0 5      nUS   [        [        R                  " [        R                  5      5      S.nU(       a  XS
'   [!        US9nU(       aQ  [#        U[$        5      (       a*  UR'                  UR)                  X`R*                  5      5        UR-                  U5        O*U	(       a  UR/                  U5        OUR1                  U5        U
=(       d    S H"  nUR3                  UR5                  5       5        M$     SnU R6                  (       a  U R6                  R9                  U5        UnU R:                  b  U R:                  R9                  U5        UnU$ )a  Captures an event.

:param event: A ready-made event that can be directly sent to Sentry.

:param hint: Contains metadata about the event that can be read from `before_send`, such as the original exception object or a HTTP request object.

:param scope: An optional :py:class:`sentry_sdk.Scope` to apply to events.

:returns: An event ID. May be `None` if there is no DSN set or of if the SDK decided to discard the event for other reasons. In such situations setting `debug=True` on `init()` may help.
r   Nprofileevent_idr   r8  check_inattachmentscontextsr   dynamic_sampling_context)r  sent_at)r  )rj   rw  rZ  rk   uuiduuid4hexrk  _sessionr  r  r   r   rU  r   rV  r*   re   r-   add_profileto_jsonr|   add_transactionadd_checkin	add_eventadd_itemto_envelope_itemr   r   r   )r   r`  ra  rb  r  r  	event_optr  re  
is_checkinr  trace_contextr  r  r   
attachmentreturn_values                    r   r   _Client.capture_event4  s1   " DJB##E77))It,99Z(+/::<+;+;;E*''U;	 %*%..t++G;"v.-?]]6*j8
 --e::hh}-!j"599'BHb#0#4#45OQS#T  "*-'X\\(BC

 $7GG,'7++$$W__Y%MN$$Y/  +y)%++Jj99;< , >>NN++H5#L>>%NN++H5#Lr   c                    [        U R                  5      (       a  Uc  g [        R                  " 5       n[        R                  " 5       n[
        S   US   S'   [
        S   US   S'   U R                  R                  S5      nUb,  [        R                  US   ;  a  XAS   [        R                  '   U R                  R                  S5      nUb  SUS   ;  a  XQS   S'   U R                  R                  S	5      nUb  S
US   ;  a  XaS   S
'   UR                  nUb  SUS   ;  a  UR                  US   S'   UR                  S5      cA  UR                  nUR                  5       n	Ub  UR                  US'   OU	b  U	R                  US'   UR                  b;  S H5  u  pXR                  ;   d  M  XS   ;  d  M   UR                  U   US   U
'   M7     U R                  R                  SS5      nU(       a:  [        R                   " SUR                  S5       SUR                  S5       35        [#        U R                  5      nUb	  U" U0 5      nUc  g U R$                  (       a  U R$                  R'                  U5        g g )NrH   
attributeszsentry.sdk.namerI   zsentry.sdk.versionrW   rP   zsentry.environmentrO   zsentry.releasezsentry.trace.parent_span_idtrace_id))zuser.idid)z	user.nameusername)z
user.emailemailrS   Fz[Sentry Logs] [severity_textz] body)r   r|   
sentry_sdkget_current_scopeget_isolation_scoper'  rk   r    SERVER_ADDRESSr>  span_idr8  get_active_propagation_contextr  _userr   rS   r   r   add)r   r   current_scopeisolation_scoperW   rP   rO   r>  r8  propagation_contextlog_attributeuser_attributerS   before_send_logs                 r   r   !_Client._capture_experimental_log  su   --"446$88:/7/?L+,2:92EL./ll&&}5"x'>'>c,FW'W9Dh556ll&&}5"';3|CT'T6A23,,""9-#33|;L#L29./!! =SEV V?C||C;<77:&'33K"1"P"P"R&"-"6"6J$0"5">">J   ,2- #&;&;;%->>7F7L7L&8C%m42   %0LL!#''/":!;2cggfo=NO .dll;&!#r*C;  % r   c                     UR                   (       d  [        R                  " S5        g U R                  R	                  U5        g )Nz3Discarded session update because of missing release)rO   r   r  r  add_session)r   r  s     r   r   _Client.capture_session  s,     KKMN  ,,W5r   c                     g r   r   r   s     r   r   _Client.get_integration  r   r   c                     g r   r   r   s     r   r   r    r   r   c                     [        U[        5      (       a  UnO%UR                  b  UR                  nO[        S5      eU R                  R                  U5      $ )zReturns the integration for this client by name or class.
If the client does not have that integration then `None` is returned.
zIntegration has no name)re   rg   
identifierr!  r	  rk   )r   r   integration_names      r   r   r    sS     mS)),%%1,77677  $$%566r   c                    U R                   b  U R                  XS9  U R                  R                  5         U R                  b  U R                  R                  5         U R
                  b  U R
                  R                  5         U R                  (       a  U R                  R                  5         U R                   R                  5         SU l         gg)zm
Close the client and shut down the transport. Arguments have the same
semantics as :py:meth:`Client.flush`.
Ntimeoutcallback)r   r   r  killr   r   r   r   r  r  s      r   r   _Client.close  s     >>%JJwJ:  %%'&&2'',,.+  %%'||!!#NN!!DN &r   c                 F   U R                   b  Uc  U R                  S   nU R                  R                  5         U R                  b  U R                  R                  5         U R
                  b  U R
                  R                  5         U R                   R                  XS9  gg)a  
Wait for the current events to be sent.

:param timeout: Wait for at most `timeout` seconds. If no `timeout` is provided, the `shutdown_timeout` option value is used.

:param callback: Is invoked with the number of pending events and the configured timeout.
Nshutdown_timeoutr  )r   r|   r  r   r   r   r  s      r   r   _Client.flush  s     >>%,,'9:  &&(&&2''--/+  &&(NN   D &r   c                     U $ r   r   r   s    r   r   _Client.__enter__  r   r   c                 $    U R                  5         g r   )r   r   s       r   r   _Client.__exit__"  s    

r   )r	  r   r   r   r|   r  r   r   r   )NN)r   r   r   r   r   r   r   r   r   r   r   r   r   rM   rk  rt  rw  r  r  r   r   r   r   r   r   r   r   r   r   r   __classcell__)r   s   @r   r   r     s    
)
1fE)N= # #
vp4 	,.`%
T 	SjA&F6 		 
	 
	 
	7$ "0 E. r   r   )r   c                       \ rS rSrSrg)r   i0  r   Nr   r   r   r   r   r   r   r   r   r   0      r   r   c                       \ rS rSrSrg)Clienti3  r   Nr  r   r   r   r  r  3  r  r   r  c                      [         $ r   )r   r   r   r   r  r  <  s    <r   c                      [         $ r   )r   r   r   r   r  r  =  s    gr   )krm   r  r  rp   collections.abcr   r   r   	importlibr   typingr   r   r	   r
   r   rv   r  sentry_sdk._compatr   r   sentry_sdk.utilsr   r   r   r   r   r   r   r   r   r   r   r   r   r   sentry_sdk.serializerr   sentry_sdk.tracingr   sentry_sdk.transportr   r   sentry_sdk.constsr    r!   r"   r#   r$   r%   sentry_sdk.integrationsr&   r'   sentry_sdk.integrations.deduper(   sentry_sdk.sessionsr)   sentry_sdk.enveloper*   'sentry_sdk.profiler.continuous_profilerr+   (sentry_sdk.profiler.transaction_profilerr,   r-   r.   sentry_sdk.scrubberr/   sentry_sdk.monitorr0   r1   r2   r3   r4   r5   r6   r7   sentry_sdk._typesr8   r9   r:   r;   r<   r  r>   sentry_sdk.scoper?   sentry_sdk.sessionr@   r%  rA   rB   r   rD   rE   r  r'  r   ModuleNotFoundErrorr   rs   ImportErrorr   r   r   rg   r   r  r   r   r   <module>r     sm   	    # ' # < <   ?     , $ B  N < . ( M 
 . &;;34&*4.2;'A 34  +@AL^)0X Xv	 	Uj Up !'c3h "G  (*K Fq  )()s   F F*)F*