관리-도구
편집 파일: envelope.cpython-37.opt-1.pyc
B T ab! � @ s� d dl Z d dlZd dlZd dlmZ d dlmZ d dlmZ d dl m Z mZ er�d dlm Z d dlmZ d dlmZ d d lmZ d d lmZ d dlmZ d dlmZmZ G d d� de�ZG dd� de�ZG dd� de�ZdS )� N)� text_type)�MYPY)�Session)� json_dumps�capture_internal_exceptions)�Any)�Optional)�Union)�Dict)�List)�Iterator)�Event�EventDataCategoryc @ s� e Zd Zd dd�Zedd� �Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zedd� �Zedd� �Zdd� ZdS )!�EnvelopeNc C s: |d k rt |�}|pi | _|d kr(g }nt|�}|| _d S )N)�dict�headers�list�items)�selfr r � r �D/opt/alt/python37/lib/python3.7/site-packages/sentry_sdk/envelope.py�__init__ s zEnvelope.__init__c C s$ dt | j�d�dd� | jD ��f S )Nzenvelope with %s items (%s)z, c s s | ]}|j V qd S )N)� data_category)�.0�xr r r � <genexpr>* s z'Envelope.description.<locals>.<genexpr>)�lenr �join)r r r r �description% s zEnvelope.descriptionc C s | � tt|d�dd�� d S )N)�json�event)�payload�type)�add_item�Item� PayloadRef)r r r r r � add_event- s zEnvelope.add_eventc C s | � tt|d�dd�� d S )N)r �transaction)r! r"