Graybyt3 Was Here
Linux cloud.locucionar.com 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
Apache
91.191.211.241
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
sentry_sdk
/
integrations
/
__pycache__
[ HOME ]
Exec
Submit
aiohttp.cpython-38.pyc
U ��\1 � @ s� d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm Z d dl mZ d dlm Z mZmZ d dlZd dlmZmZ G d d � d e�Zdd� Zd d� ZdS )� N)�reraise)�Hub)�Integration)� ignore_logger)�_filter_headers)�capture_internal_exceptions�event_from_exception�HAS_REAL_CONTEXTVARS)�Application� HTTPExceptionc @ s e Zd ZdZedd� �ZdS )�AioHttpIntegration�aiohttpc s0 t std��td� tj� � fdd�} | t_d S )NzRThe aiohttp integration for Sentry requires Python 3.7+ or aiocontextvars packagezaiohttp.serverc � s* � ����fdd�}t �� �|� �I d H S )Nc � s� t j} | �t�d kr,���f� ���I d H S t���}t t j���} | �� �}|�� |�t |�� W 5 Q R X z����I d H }W n4 t k r� � Y n tk r� tt | �� Y nX |W 5 Q R � S Q R X d S )N)r ZcurrentZget_integrationr �weakref�refZconfigure_scopeZclear_breadcrumbsZadd_event_processor�_make_request_processorr � Exceptionr �_capture_exception)�hub�weak_requestZscopeZresponse)�args�kwargs� old_handle�request�self� �/aiohttp.py�inner0 s zGAioHttpIntegration.setup_once.<locals>.sentry_app_handle.<locals>.inner)�asyncioZget_event_loopZcreate_task)r r r r r �r )r r r r r �sentry_app_handle. s z8AioHttpIntegration.setup_once.<locals>.sentry_app_handle)r �RuntimeErrorr r Z_handle)r r r r � setup_once s �zAioHttpIntegration.setup_onceN)�__name__� __module__�__qualname__Z identifier�staticmethodr! r r r r r s r c s � fdd�}|S )Nc s� � � }|d kr| S t � �^ | �di �}d|j|j|jf |d<