관리-도구
편집 파일: beam.cpython-37.opt-1.pyc
B T a � @ s0 d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZmZ d dl mZ d dlmZ d d lmZ er�d d lmZ d dlmZ d dlmZ d d lmZ d dlmZ d dlmZ d dlmZ ed�Zededef d�ZdZdZdZ G dd� de�Z!dd� Z"dd� Z#dd� Z$d d!� Z%d"d#� Z&dS )$� )�absolute_importN)�wraps)�Hub)�reraise)�capture_internal_exceptions�event_from_exception)�Integration)� ignore_logger)�MYPY)�Any)�Iterator)�TypeVar)�Optional)�Callable)�Client)�ExcInfo�T�F.)Zboundz_wrapped_{}_z_inspect_{}Z _sentry_used_c @ s e Zd ZdZedd� �ZdS )�BeamIntegration�beamc sp ddl m} m} td� td� ddddg� x$� D ]}t| t�|�t| |�� q2W |j�� �fd d �}||_d S )Nr )�DoFn�ParDo�rootzbundle_processor.create�processZstart_bundleZ finish_bundleZsetupc s� t | dd�s�xp� D ]h}t||�s"qt�|�}t ||�}t |t�|��}t |td�st |td�st|||� t||t|�� qW d| _�| |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)�function_patches�old_init� �M/opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/integrations/beam.py�sentry_init_pardo6 s z5BeamIntegration.setup_once.<locals>.sentry_init_pardo) �apache_beam.transforms.corer r r r! r r �_wrap_inspect_call�__init__)r r r'