관리-도구
편집 파일: sanic.cpython-311.pyc
� �܋f>, � �F � d dl Z d dlZd dlmZ d dlmZmZ d dlmZ d dl m Z d dlmZm Z mZmZmZ d dlmZmZ d dlmZmZ d d lmZ d d lmZ er<d dlmZ d dlmZ d d lmZ d dlmZ d dlm Z d dlm!Z! d dl"m#Z#m$Z$ d dlm%Z%m&Z&m'Z' d dl(m)Z) d dl*m+Z+m,Z- d dl.m/Z/ d dl(m0Z0 d dl1m2Z2 n# e3$ r ed� � �w xY we2j4 Z5e+j6 Z7e0j8 Z9 e+j: Z;n# e<$ r Y nw xY w G d� de� � Z= G d� de� � Z>d� Z?d� Z@d� Z:d � ZAd!� ZBd"� ZCd#� ZDd$� ZEd%� ZFd&� ZGd'� ZHdS )(� N)�isawaitable)�urlparse�reraise)�Hub)�TRANSACTION_SOURCE_COMPONENT)�capture_internal_exceptions�event_from_exception�HAS_REAL_CONTEXTVARS�CONTEXTVARS_ERROR_MESSAGE� parse_version)�Integration�DidNotEnable)�RequestExtractor�_filter_headers)� ignore_logger)� TYPE_CHECKING)�Any)�Callable)�Optional)�Union)�Tuple)�Dict)�Request�RequestParameters)�Event�EventProcessor�Hint)�Route)�Sanic�__version__)�SanicException)�Router)�ErrorHandlerzSanic not installedc �, � e Zd ZdZdZed� � � ZdS )�SanicIntegration�sanicNc �� � t t � � t _ t j �'t d� t � � � � �t j dk rt d� � �t st dt z � � �t j d� � rt d� � t j dk rt � � d S t � � d S )NzUnparsable Sanic version: {})r � zSanic 0.8 or newer required.zUThe sanic integration for Sentry requires Python 3.7+ or the aiocontextvars package.z0.8.�root�� � )r � SANIC_VERSIONr% �versionr �formatr r � startswithr �_setup_legacy_sanic�_setup_sanic� � �T/opt/cloudlinux/venv/lib64/python3.11/site-packages/sentry_sdk/integrations/sanic.py� setup_oncezSanicIntegration.setup_once9 s� � � $1��#?�#?�� ��#�+��=�D�D�]�S�S�T�T�T��#�f�,�,��=�>�>�>�#� � �2�4M�N�� � � �#�F�+�+� "� �&�!�!�!��#�g�-�-��!�!�!��F������r4 )�__name__� __module__�__qualname__� identifierr. �staticmethodr6 r3 r4 r5 r% r% 5 s7 � � � � � ��J��G��#� #� �\�#� #� #r4 r% c �>