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
sanic.cpython-38.pyc
U ��\� � @ s� d dl Z d dlZd dlmZ d dlmZmZ d dlmZ d dl m Z mZmZ d dl mZ d dlmZmZ d dlmZ d d lmZmZ d d lmZ d dlmZ d dlmZ G d d� de�Z&dd� Z'dd� Z(G dd� de�Z)dS )� N)�isawaitable)�urlparse�reraise)�Hub)�capture_internal_exceptions�event_from_exception�HAS_REAL_CONTEXTVARS)�Integration)�RequestExtractor�_filter_headers)� ignore_logger)�Sanic�__version__)�SanicException)�Router)�ErrorHandlerc @ s e Zd ZdZedd� �ZdS )�SanicIntegration�sanicc sj t std��t�d�rtd� tj��fdd�} | t_tj��fdd�}|t_t j � � fdd �}|t _ d S ) NzPThe sanic integration for Sentry requires Python 3.7+ or aiocontextvars packagez0.8.�rootc � s� t j}|�t�d kr&� | |f|�|�S t�|�}t |��`}|�� �}|�� |�t |�� W 5 Q R X � | |f|�|�}t |�r�|I d H }|W 5 Q R � S Q R X d S �N)r �current�get_integrationr �weakref�ref�configure_scopeZclear_breadcrumbsZadd_event_processor�_make_request_processorr )�self�request�args�kwargs�hub�weak_request�scope�response)�old_handle_request� � /sanic.py�sentry_handle_request= s z:SanicIntegration.setup_once.<locals>.sentry_handle_requestc sT � | |�}t j}|�t�d k rPt� �& |�� �}|d j|_W 5 Q R X W 5 Q R X |S �Nr )r r r r r r �__name__Ztransaction)r r �rvr r"