OwlCyberSecurity - MANAGER
Edit File: envelope.cpython-312.pyc
� G��g) � �� � d dl Z d dlZd dlZd dlmZ d dlmZmZ d dlm Z e r,d dlm Z d dlmZ d dlmZ d dlm Z d d lmZ d d lmZ d dlmZmZ d� Z G d � d� Z G d� d� Z G d� d� Zy)� N)�Session)� json_dumps�capture_internal_exceptions)� TYPE_CHECKING)�Any)�Optional)�Union)�Dict)�List)�Iterator)�Event�EventDataCategoryc �p � t | t � r| j dd� } t j | � S )N�utf-8�replace)� isinstance�bytes�decode�json�loads)�datas �B/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/envelope.py� parse_jsonr s- � � �$����{�{�7�I�.���:�:�d��� c � � e Zd ZdZ dd�Zed� � Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Zd� Zd� Zd� Zd� Zd� Zed� � Zed� � Zd� Zy)�Envelopea. Represents a Sentry Envelope. The calling code is responsible for adhering to the constraints documented in the Sentry docs: https://develop.sentry.dev/sdk/envelopes/#data-model. In particular, each envelope may have at most one Item with type "event" or "transaction" (but not both). Nc �p � |�t |� }|xs i | _ |� g }|| _ y t |� }|| _ y �N)�dict�headers�list�items)�selfr r"