File: //opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/__pycache__/transport.cpython-37.pyc
B
T a�0 � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z m
Z
mZmZ d dl
mZ d dlmZ d dlmZ e�rd 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"yd dl#m$Z$ W n" e%k
�r@ d dl&m$Z$ Y nX G dd� de'�Z(ddd�Z)G dd� de(�Z*G dd� de(�Z+dd� 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 @ sH e Zd ZdZdZddd�Zdd� Zdd� Zdd d
�Zdd� Z d
d� Z
dS )� TransportzWBaseclass for all transports.
A transport is used to send an event to sentry.
Nc C s8 || _ |r.|d d k r.|d r.t|d �| _nd | _d S )N�dsn)�optionsr �
parsed_dsn)�selfr � r �E/opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/transport.py�__init__/ s zTransport.__init__c C s
t � �dS )zm
This gets invoked with the event dictionary when an event should
be sent to sentry.
N)�NotImplementedError)r �eventr r r �
capture_event9 s zTransport.capture_eventc C s
t � �dS )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.
N)r! )r �enveloper r r �capture_envelopeC s zTransport.capture_envelopec C s dS )z=Wait `timeout` seconds for the current events to be sent out.Nr )r �timeout�callbackr r r �flushQ s zTransport.flushc C s dS )zForcefully kills the transport.Nr )r r r r �killZ s zTransport.killc C s&