관리-도구
편집 파일: aws_lambda.cpython-311.pyc
� R�Dg�2 � �L � d dl m Z mZ d dlmZ d dlZd dlmZmZ d dlm Z d dl mZ d dlm Z mZmZmZmZ d dlmZ d d lmZ d d lmZ er7d dlmZ d dlmZ d d lmZ d dlmZ d dlmZmZmZ ededef �� � Z dZ!dZ"d� Z#d� Z$d� Z% G d� de� � Z&d� Z'd� Z(d� Z)dS )� )�datetime� timedelta)�environN)�Hub�_should_send_default_pii)�Transaction)�reraise)�AnnotatedValue�capture_internal_exceptions�event_from_exception�logger� TimeoutThread)�Integration)�_filter_headers)�MYPY)�Any)�TypeVar)�Callable)�Optional)�EventProcessor�Event�Hint�F.)�boundi� g @�@c � � � � fd�}|S )Nc � �� t j }|� t � � }|� � | i |��S |j }t � � 5 |� � � 5 }|� � � d d d � � n# 1 swxY w Y t j � � }|rCt |� � r4t ||j ddd��� � \ }}|� ||�� � d d d � � n# 1 swxY w Y � | i |��S )N� aws_lambdaF��type�handled��client_options� mechanism��hint)r �current�get_integration�AwsLambdaIntegration�clientr �configure_scope�clear_breadcrumbs�sys�exc_info�allr �options� capture_event) �args�kwargs�hub�integrationr) �scoper- �eventr% � init_errors ���/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/integrations/aws_lambda.py�sentry_init_errorz+_wrap_init_error.<locals>.sentry_init_error% s� �� � �k���)�)�*>�?�?�����:�t�.�v�.�.�.� ��� (� *� *� 4� 4��$�$�&�&� *�%��'�'�)�)�)� *� *� *� *� *� *� *� *� *� *� *���� *� *� *� *� �|�~�~�H�� 4�C��M�M� 4�2��#)�>�'3��F�F�� � ���t� �!�!�%�d�!�3�3�3� 4� 4� 4� 4� 4� 4� 4� 4� 4� 4� 4���� 4� 4� 4� 4� �z�4�*�6�*�*�*s7 �C,�A=�1C,�=B �C,�B �AC,�,C0�3C0� )r7 r9 s ` r8 �_wrap_init_errorr; # s$ �� �+� +� +� +� +�4 �� c � � � � fd�}|S )Nc �( �� t j }|� t � � }|� �| |g|�R i |��S |j }|� � � }|� � � 5 }t � � 5 |� � � |� t | ||� � � � |� d|j � d� � d � � d } |j rI|t k r>|t z t z } t# | |t z � � } | � � � d d d � � n# 1 swxY w Y | � di � � }t) j |d|j �� � }|� |� � 5 �| |g|�R i |��| r| � � � cd d d � � cd d d � � S # t2 $ rS t5 j � � } t9 | |j ddd �� � � \ } }|� | |�� � t? | � Y nw xY w | r| � � � n# | r| � � � w w xY wd d d � � n# 1 swxY w Y d d d � � d S # 1 swxY w Y d S )N� aws_region�:� �headerszserverless.function)�op�namer Fr r! r$ ) r r&