
    tni                         d dl Z d dlmZmZ d dlmZ d dlmZmZ d dl	m
Z
 e
rd dl	mZ d dlmZmZ 	 d dlZn# e$ r  ed          w xY w G d	 d
e          ZdS )    N)IntegrationDidNotEnableadd_global_event_processor)walk_exception_chainiter_stacks)TYPE_CHECKING)Optional)EventHintzexecuting is not installedc                   *    e Zd ZdZedd            ZdS )ExecutingIntegration	executingreturnNc                  4    t           	 	 	 	 	 	 dd            } d S )	Neventr   hintOptional[Hint]r   Optional[Event]c                     t          j                                        t                    | S || S |                    dd           }|| S |                     dd           }|| S |                    dd           }|| S t          t          |          t          |                    D ]\  }\  }}}d |                    di                               dg           D             }t          t          |                    }	t          |          t          |	          k    rzt          ||	          D ]H\  }
}|j        }t          j                            |          }|                    |j                  |
d<   I| S )Nexc_info	exceptionvaluesc                 <    g | ]}|                     d           |S )function)get).0frames     ^/var/www/html/gpu-tools/venv/lib/python3.11/site-packages/sentry_sdk/integrations/executing.py
<listcomp>zOExecutingIntegration.setup_once.<locals>.add_executing_info.<locals>.<listcomp>4   s:     ! ! !yy,,!! ! !    
stacktraceframesr   )
sentry_sdk
get_clientget_integrationr   r   zipreversedr   listr   lentb_framer   Source	for_framecode_qualnamef_code)r   r   r   r   r   	_exc_type
_exc_valueexc_tbsentry_framestbssentry_frametbr   sources                 r   add_executing_infoz;ExecutingIntegration.setup_once.<locals>.add_executing_info   s    $&&667KLLT|xx
D11H		+t44I ]]8T22F~>A  "6x"@"@? ? R R:	:Iz6! !!*|R!@!@!D!DXr!R!R! ! !
 ;v..//}%%S11(+M3(?(? R R$L"KE&-77>>F/5/C/CEL/Q/QL,,R
 Lr!   )r   r   r   r   r   r   r   )r8   s    r   
setup_oncezExecutingIntegration.setup_once   sC    	#)	)	"2)	)	 )	 )	 
$	#)	 )	 )	r!   )r   N)__name__
__module____qualname__
identifierstaticmethodr9    r!   r   r   r      s7        J+ + + \+ + +r!   r   )r$   sentry_sdk.integrationsr   r   sentry_sdk.scoper   sentry_sdk.utilsr   r   typingr	   r
   sentry_sdk._typesr   r   r   ImportErrorr   r?   r!   r   <module>rF      s       = = = = = = = = 7 7 7 7 7 7 > > > > > > > >             .--------5 5 5 5
,3
4
445/ / / / /; / / / / /s	   7 A