관리-도구
편집 파일: aiohttp.cpython-311.pyc
� x�։�)��� � � d dl Z d dlZd dlmZ d dlmZ d dlmZmZ d dl m Z d dlmZm Z d dlmZ d dlmZmZmZmZmZmZ d dlZd d lmZ d d lmZmZmZ n# e$ r ed� � �w xY wd dl m!Z! e!r<d d l"m#Z# d dl$m%Z% d dl&m'Z' d dl&m(Z( d dl&m)Z) d dl&m*Z* d dl&m+Z+ d dl&m,Z, d dlm-Z- d dl m.Z. dZ/ G d� de� � Z0d� Z1d� Z2dZ3d� Z4dS )� N)�reraise)�Hub)�Integration�DidNotEnable)� ignore_logger)�_filter_headers�request_body_within_bounds)�Transaction)�capture_internal_exceptions�event_from_exception�transaction_from_function�HAS_REAL_CONTEXTVARS�CONTEXTVARS_ERROR_MESSAGE�AnnotatedValue)�__version__)�Application� HTTPException� UrlDispatcherzAIOHTTP not installed)�MYPY)�Request)�AbstractMatchInfo)�Any)�Dict)�Optional)�Tuple)�Callable)�Union)�ExcInfo)�EventProcessor)�handler_name�method_and_path_patternc �0 � e Zd ZdZdd�Zed� � � ZdS )�AioHttpIntegration�aiohttpr c �\ � |t vrt d|�dt �d�� � �|| _ d S )Nz%Invalid value for transaction_style: z (must be in �))�TRANSACTION_STYLE_VALUES� ValueError�transaction_style)�selfr) s �/builddir/build/BUILD/imunify360-venv-2.5.2/opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/integrations/aiohttp.py�__init__zAioHttpIntegration.__init__4 sJ � ��$<�<�<��*�$�$�$�&>�&>�&>�@�� � � "3����� c � ��� t t t t j d� � d d� � � � � } n<# t t f$ r( t d� t � � � � �w xY w| dk rt d� � �t st dt z � � �t d� � t j ��fd�}|t _ t j ��fd �}|t _ d S ) N�.� zAIOHTTP version unparseable: {})� � zAIOHTTP 3.4 or newer required.zSThe aiohttp integration for Sentry requires Python 3.7+ or aiocontextvars package.zaiohttp.serverc � �� �K � t j }|� t � � � � | |g|�R i |��� d {V ��S t j |� � }t t j � � 5 }|� � � 5 }|� � � |� t |� � � � d d d � � n# 1 swxY w Y t j |j dd�� � }|� |d|i�� � 5 � | |� � � d {V ��}nr# t $ r } |� | j � � � d } ~ wt"