'
X 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(ddZ) G d de( Z* G d de( Z+d Z,dS ) )print_functionN)datetime timedelta)Dsnloggercapture_internal_exceptions
json_dumps)BackgroundWorker)Envelope)MYPY)Any)Callable)Dict)Iterable)Optional)Tuple)Type)Union)PoolManager)ProxyManager)EventEndpointType)
getproxiesc B e Zd ZdZdZ d dZd Zd Z d dZd 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 )Ndsn)optionsr
parsed_dsn)selfr s t/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/sentry_sdk/transport.py__init__zTransport.__init__/ sG #wu~1gen1!'%.11DOOO"DOOO c t )zm
This gets invoked with the event dictionary when an event should
be sent to sentry.
NotImplementedErrorr 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 timeoutcallbacks 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 wN)r5 Exceptionr4 s r! __del__zTransport.__del___ s: IIKKKKK DD s
&&r7 )__name__
__module____qualname____doc__r r" r) r, r2 r5 r9 r. r# r! r r ' s
J # # # #$ $ $$ $ $"
r# r c # p K |t j }| d D ]} | dd \ }}}|t t | z }|r| d pdD ]}||fV r# t t f$ r Y w xY wd S )N,: seconds;r7 )r utcnowsplitstripr intLookupError
ValueError)headernowlimitretry_after
categories_categorys r! _parse_rate_limitsrR g s
{oc"" ).)<)