
    ghs                     b    S SK r S SKJr  S SKJr  S SKJrJr  S SKJ	r	  S SK
Jr   " S S\5      rg)	    N)Integration)SentryWsgiMiddleware)ensure_integration_enabledevent_from_exception)TrytonException)appc                   8    \ rS rSrSrS\ 3rS r\S 5       rSr	g)TrytondWSGIIntegration   trytond_wsgiz
auto.http.c                     g N )selfs    b/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sentry_sdk/integrations/trytond.py__init__TrytondWSGIIntegration.__init__   s        c                  *  ^ [        [        R                  [        R                  S9[        l        [        [        5      S 5       m[        [        S5      (       a  [        R                  U4S j5       n g [        R                  R                  T5        g )N)span_originc                     [        U [        5      (       a  g [        R                  " 5       n[	        U UR
                  SSS.S9u  p#[        R                  " X#S9  g )NtrytondF)typehandled)client_options	mechanism)hint)
isinstancer   
sentry_sdk
get_clientr   optionscapture_event)eclienteventr   s       r   error_handler8TrytondWSGIIntegration.setup_once.<locals>.error_handler   sN    !_--#..02#)>>'0UC
 ((:r   r&   c                    > T" U5        g r   r   )r   requestr#   r&   s      r   _,TrytondWSGIIntegration.setup_once.<locals>._-   s    a r   )
r   r   wsgi_appr
   originr   hasattrr&   error_handlersappend)r*   r&   s    @r   
setup_once!TrytondWSGIIntegration.setup_once   sv    +LL.55

 
$$:	;
	; 
<
	; 3((! ! %%m4r   r   N)
__name__
__module____qualname____firstlineno__
identifierr-   r   staticmethodr1   __static_attributes__r   r   r   r
   r
      s,    J*&F 5 5r   r
   )r   sentry_sdk.integrationsr   sentry_sdk.integrations.wsgir   sentry_sdk.utilsr   r   trytond.exceptionsr   trytond.wsgir   r
   r   r   r   <module>r?      s#     / = M . %5[ %5r   