관리-도구
편집 파일: utils.cpython-38.pyc
U ��\�k � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlmZm Z m Z mZmZm Z mZ errd dlmZmZ nd dlmZmZ eddd�Ze� d�Z!e"� Z#g Z$d d � Z%dd� Z&ed d� �Z'dd� Z(dudd�Z)G dd� de*�Z+e G dd� de"��Z,G dd� de"�Z-dd� Z.dd� Z/dd� Z0dd � Z1dvd"d#�Z2dwd$d%�Z3d&d'� Z4d(d)� Z5d*d+� Z6dxd-d.�Z7d/d0� Z8d1d2� Z9dyd4d5�Z:dzd6d7�Z;d{d8d9�Z<d:d;� Z=d|d<d=�Z>e?e@d>�ZAeA�r�d?d@� ZBndAd@� ZBd}dBdC�ZCdDdE� ZDdFdG� ZEdHdI� ZFd~dJdK�ZGdLdM� ZHdNdO� ZIddPdQ�ZJdRdS� ZKG dTdU� dUe"�ZLdVdW� ZMdXdY� ZNdZd[� ZOd\d]� ZPd^d_� ZQd`da� ZRG dbdc� dce"�ZSddde� ZTd�dgdh�ZUd�didj�ZVeVfdkdl�ZWd3ZXz*d dmlYmZZZ e�s�ej[dnk �r�d dl\Z\W n6 e]k �r� doZXd dpl^m_Z_ G dqdr� dre"�ZZY nX dsdt� Z`dS )�� N)�contextmanager)�datetime)�urlparse� text_type�implements_str�string_types�number_types� int_types�PY2)�Mapping�Sequencei� � zsentry_sdk.errorsc C s t �| � d S �N)�global_repr_processors�append)� processor� r �A/opt/alt/python38/lib/python3.8/site-packages/sentry_sdk/utils.py�add_global_repr_processor9 s r c C s d S r r r r r r �_get_debug_hub= s r c c s@ z d V W n0 t k r: t� } | d k r6| �t�� � Y nX d S r )� Exceptionr Z_capture_internal_exception�sys�exc_info)Zhubr r r �capture_internal_exceptionsB s r c C s | t �� S r )�epoch� total_seconds��valuer r r �to_timestampM s r c C s2 | dkrt �� } nt| �} | d dkr*d} d| iS )z+Creates a hint with the exc info filled in.Nr r )r r �exc_info_from_error�r r r r �event_hint_with_exc_infoQ s r! c @ s e Zd ZdZdS )�BadDsnzRaised on invalid DSNs.N)�__name__� __module__�__qualname__�__doc__r r r r r"