HI. d dl Z d dlZd dlmZ d dlmZmZ d dlmZ d dl m
Z
mZmZm
Z
d dlmZmZ d dlmZmZ d dlmZ d d lmZ er6d d
lmZ d dlmZ d dlmZ d d
lmZ d dlmZ d dlmZ d dlm Z m!Z! d dlm"Z"m#Z#m$Z$ d dl%m&Z&m'Z( d dl)m*Z* d dl+m,Z, d dl-m.Z. n# e/$ r ed w xY w G d de Z0d Z1d Z2 G d de Z3dS ) N)isawaitable)urlparsereraise)Hub)capture_internal_exceptionsevent_from_exceptionHAS_REAL_CONTEXTVARSCONTEXTVARS_ERROR_MESSAGE)IntegrationDidNotEnable)RequestExtractor_filter_headers)
ignore_logger)MYPY)Any)Callable)Optional)Union)Tuple)Dict)RequestRequestParameters)EventEventProcessorHint)Sanic__version__)SanicException)Router)ErrorHandlerzSanic not installedc ( e Zd ZdZed ZdS )SanicIntegrationsanicc J t t t t j d } n<# t
t f$ r( t d t w xY w| dk rt d t st dt z t j d rt d t j fd}|t _ t j fd }|t _ t" j fd
}|t" _ d S )N.zUnparsable Sanic version: {})r zSanic 0.8 or newer required.zUThe sanic integration for Sentry requires Python 3.7+ or the aiocontextvars package.z0.8.rootc K t j }| t
| |g|R i |S t j | }t | 5 }| 5 }| | t | d d d n# 1 swxY w Y | |g|R i |}t | r| d {V }|cd d d S # 1 swxY w Y d S N)r currentget_integrationr" weakrefrefconfigure_scopeclear_breadcrumbsadd_event_processor_make_request_processorr ) selfrequestargskwargshubweak_requestscoperesponseold_handle_requests }/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/integrations/sanic.pysentry_handle_requestz:SanicIntegration.setup_once.