관리-도구
편집 파일: serverless.cpython-38.pyc
U ��\� � @ sR d dl Z d dlZd dlmZ d dlmZ d dlmZ ddd�Zdd � Z d d� Z dS ) � N)�Hub)�event_from_exception)�reraiseTc s$ � fdd�}| d kr|S || �S d S )Nc s t �� �� �fdd��}|S )Nc s� t t j��l}|�� �}|�� W 5 Q R X z<z� | |�W W �,W 5 Q R � S tk r` t� Y nX W 5 �rpt� X W 5 Q R X d S �N)r �currentZconfigure_scopeZclear_breadcrumbs� _flush_client� Exception�_capture_and_reraise)�args�kwargs�hubZscope)�f�flush� �S/opt/alt/python38/lib/python3.8/site-packages/sentry_sdk/integrations/serverless.py�inner s z3serverless_function.<locals>.wrapper.<locals>.inner)� functools�wraps)r r �r )r r �wrapper s z$serverless_function.<locals>.wrapperr )r r r r r r �serverless_function s r c C sV t �� } tj}|d k rJ|jd k rJt| |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 ! s � r c C s t j} | d k r| �� d S r )r r r )r r r r r / s r )NT)r r Zsentry_sdk.hubr Zsentry_sdk.utilsr Zsentry_sdk._compatr r r r r r r r �<module> s