U 췀gs@s\ddlZddlmZddlmZddlmZmZddlm Z ddl m Z GdddeZ dS) N) Integration)SentryWsgiMiddleware)ensure_integration_enabledevent_from_exception)TrytonException)appc@s.eZdZdZdeZddZeddZdS)TrytondWSGIIntegrationZ trytond_wsgiz auto.http.cCsdSN)selfr r M/opt/hc_python/lib/python3.8/site-packages/sentry_sdk/integrations/trytond.py__init__szTrytondWSGIIntegration.__init__csPttjtjdt_ttddttdr@tjfdd}n tj dS)N)Z span_origincSsBt|trdSt}t||jdddd\}}tj||ddS)NZtrytondF)typeZhandled)Zclient_optionsZ mechanism)hint) isinstancer sentry_sdkZ get_clientroptionsZ capture_event)eclienteventrr r r error_handlers  z8TrytondWSGIIntegration.setup_once..error_handlerrcs |dSr r )rrequestrrr r _-sz,TrytondWSGIIntegration.setup_once.._) rrZwsgi_approriginrhasattrrZerror_handlersappend)rr rr setup_onces  z!TrytondWSGIIntegration.setup_onceN)__name__ __module__ __qualname__ identifierrr staticmethodrr r r r r s  r) rZsentry_sdk.integrationsrZsentry_sdk.integrations.wsgirZsentry_sdk.utilsrrZtrytond.exceptionsrZ trytond.wsgirrr r r r s