관리-도구
편집 파일: spark_worker.cpython-37.pyc
B T a� � @ s� d dl mZ d dlZd dlmZ d dlmZ d dlmZ d dl m Z mZmZm Z mZ d dlmZ er�d dlmZ d d lmZ d d lmZmZmZ G dd� de�Zd d� Zdd� Zdd� ZdS )� )�absolute_importN)�configure_scope)�Hub)�Integration)�capture_internal_exceptions�exc_info_from_error�!single_exception_from_error_tuple�walk_exception_chain�event_hint_with_exc_info)�MYPY)�Any)�Optional)�ExcInfo�Event�Hintc @ s e Zd ZdZedd� �ZdS )�SparkWorkerIntegrationZspark_workerc C s dd l m} t| _d S )Nr )Zpyspark.daemon�daemon�_sentry_worker_mainZworker_main)Zoriginal_daemon� r �[/opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/integrations/spark/spark_worker.py� setup_once s z!SparkWorkerIntegration.setup_onceN)�__name__� __module__�__qualname__� identifier�staticmethodr r r r r r s r c C s� |j }|j}ddd�}t| �} | \}}}g }x:t| �D ].\}}}|tttfkr6|�t|||||�� q6W |r�|� � t | �} dd|id�} t� |j| | d� d S )NZsparkF)�typeZhandled�error�values)�level� exception)�hint) �client�optionsr r � SystemExit�EOFError�ConnectionResetError�appendr �reverser �_tag_task_contextZ capture_event)�exc_info�hubr"