관리-도구
편집 파일: transport.cpython-311.pyc
� ^�Dg�- � � � d dl mZ d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z m Z mZmZ d dl mZ d dlmZ d dlmZ erLd dlmZ d d lmZ d d lmZ d dlmZ d dlmZ d d lmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZm Z ee! Z" d dl#m$Z$ n# e%$ r d dl&m$Z$ Y nw xY w G d� de'� � Z(dd�Z) G d� de(� � Z* G d� de(� � Z+d� Z,dS )� )�print_functionN)�datetime� timedelta)�Dsn�logger�capture_internal_exceptions� json_dumps)�BackgroundWorker)�Envelope)�MYPY)�Any)�Callable)�Dict)�Iterable)�Optional)�Tuple)�Type)�Union)�PoolManager)�ProxyManager)�Event�EndpointType)� getproxiesc �B � e Zd ZdZdZ d d�Zd� Zd� Z d d�Zd� Z d� Z dS ) � TransportzWBaseclass for all transports. A transport is used to send an event to sentry. Nc �~ � || _ |r,|d �$|d rt |d � � | _ d S d | _ d S )N�dsn)�optionsr � parsed_dsn)�selfr s �K/opt/imunify360/venv/lib64/python3.11/site-packages/sentry_sdk/transport.py�__init__zTransport.__init__/ sG � � ���� #�w�u�~�1�g�e�n�1�!�'�%�.�1�1�D�O�O�O�"�D�O�O�O� c � � t � � �)zm This gets invoked with the event dictionary when an event should be sent to sentry. ��NotImplementedError�r �events r! � capture_eventzTransport.capture_event9 s � � "�#�#�#r# c � � t � � �)a$ Send an envelope to Sentry. Envelopes are a data container format that can hold any type of data submitted to Sentry. We use it for transactions and sessions, but regular "error" events should go through `capture_event` for backwards compat. r% )r �envelopes r! �capture_envelopezTransport.capture_envelopeC s � � "�#�#�#r# c � � dS )z=Wait `timeout` seconds for the current events to be sent out.N� �r �timeout�callbacks r! �flushzTransport.flushQ s � � �r# c � � dS )zForcefully kills the transport.Nr. �r s r! �killzTransport.killZ s � � �r# c �R � | � � � d S # t $ r Y d S w xY w�N)r5 � Exceptionr4 s r! �__del__zTransport.__del___ s: � � ��I�I�K�K�K�K�K��� � � ��D�D� ���s � � &�&r7 )�__name__� __module__�__qualname__�__doc__r r"