관리-도구
편집 파일: chalice.cpython-38.pyc
U �Mgg � @ s0 d dl Z d dlmZ d dlZd dlmZmZ d dlmZ d dl m Z d dlmZm Z mZmZ z4d dlZd dlmZ d dlmZmZ d d lmZ W n ek r� ed ��Y nX d dlmZ e�rd dlmZ d d lmZ d dlmZ d dlmZ ededef d�ZG dd� de�Zdd� Z G dd� de�Z!dS )� N��wraps)�Integration�DidNotEnable)�_make_request_event_processor)�TRANSACTION_SOURCE_COMPONENT)�capture_internal_exceptions�event_from_exception� parse_version�reraise)�__version__)�Chalice�ChaliceViewError)�EventSourceHandlerzChalice is not installed)� TYPE_CHECKING)�Any)�Dict)�TypeVar)�Callable�F.)�boundc @ s e Zd Zdd� ZdS )r c C s� t �� }t �� ��}t� � |�� }|�t|||�� W 5 Q R X zt�| ||�W W 5 Q R � S t k r� t �� }t||j ddd�d�\}}t j||d� |�� t|� Y nX W 5 Q R X d S )N�chaliceF��typeZhandled�Zclient_optionsZ mechanism��hint)� sentry_sdk� get_client�isolation_scoper �get_remaining_time_in_millis�add_event_processorr �ChaliceEventSourceHandler�__call__� Exception�sys�exc_infor �options� capture_event�flushr )�self�event�context�client�scope�configured_timer&