관리-도구
편집 파일: serverless.cpython-37.opt-1.pyc
B T a� � @ s� d dl Z d dlmZ d dlmZ d dlmZ d dlmZ d dl m Z e r�d dlmZ d dlm Z d d lmZ d d lmZ d dlmZ d dlmZ ed e def d�Zndd� Zeddd��Zeddd��Zddd�Zdd� Zdd� ZdS )� N)�Hub)�event_from_exception)�reraise)�wraps)�MYPY)�Any)�Callable)�TypeVar)�Union)�Optional)�overload�F.)Zboundc C s | S )N� )�xr r �S/opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/integrations/serverless.pyr s r Tc C s d S )Nr )�f�flushr r r �serverless_function s r c C s d S )Nr )r r r r r r # s c s$ � fdd�}| d kr|S || �S d S )Nc s t � �� �fdd��}|S )Nc sn t t j��Z}|�� �}|�� W d Q R X z*y � | |�S tk rN t� Y nX W d �r^t� X W d Q R X d S )N)r �currentZconfigure_scopeZclear_breadcrumbs� Exception�_capture_and_reraise� _flush_client)�args�kwargs�hubZscope)r r r r �inner- s z3serverless_function.<locals>.wrapper.<locals>.inner)r )r r )r )r r �wrapper+ s z$serverless_function.<locals>.wrapperr )r r r r )r r r ) s c C sN t �� } tj}|jd k rBt| |jjddd�d�\}}|j||d� t| � d S )NZ serverlessF)�typeZhandled)Zclient_optionsZ mechanism)�hint) �sys�exc_infor r Zclientr �optionsZ capture_eventr )r r �eventr r r r r D s r c C s t j�� S )N)r r r r r r r r S s r )T)NT)NT)r Zsentry_sdk.hubr Zsentry_sdk.utilsr Zsentry_sdk._compatr Zsentry_sdk._functoolsr Zsentry_sdk._typesr �typingr r r r r r r r r r r r r r �<module> s*