관리-도구
편집 파일: beam.cpython-38.pyc
U �Mg> � @ s d dl Z d dlZd dlmZ d dlZd dlmZ d dlmZ d dl m Z mZmZm Z d dlmZ er�d dlmZ d dlmZ d d lmZ d d lmZ d dlmZ ed�Zed edef d�ZdZdZdZG dd� de�Zdd� Zdd� Zee�dd� �Zdd� Zdd� Z dS )� N)�wraps)�Integration)� ignore_logger)�capture_internal_exceptions�ensure_integration_enabled�event_from_exception�reraise)� TYPE_CHECKING)�Any)�Iterator)�TypeVar)�Callable)�ExcInfo�T�F.)�boundz_wrapped_{}_z_inspect_{}Z _sentry_used_c @ s e Zd ZdZedd� �ZdS )�BeamIntegration�beamc sl ddl m} m} td� td� ddddg� � D ]}t| t�|�t| |�� q0|j�� �fd d �}||_d S )Nr )�DoFn�ParDo�rootzbundle_processor.create�processZstart_bundleZ finish_bundle�setupc s� t | dd�s�� D ]h}t||�s qt�|�}t ||�}t |t�|��}t |td�st |td�st|||� t||t|�� qd| _�| |f|�|� d S )N�_sentry_is_patchedFT) �getattr�hasattr�WRAPPED_FUNC�format�INSPECT_FUNC� USED_FUNC�setattr�_wrap_task_callr )�self�fn�args�kwargs� func_name�wrapped_func�process_funcZinspect_func�Zfunction_patchesZold_init� �J/opt/hc_python/lib/python3.8/site-packages/sentry_sdk/integrations/beam.py�sentry_init_pardo7 s �z5BeamIntegration.setup_once.<locals>.sentry_init_pardo) �apache_beam.transforms.corer r r r r r �_wrap_inspect_call�__init__)r r r&