관리-도구
편집 파일: asgi.cpython-311.pyc
� �܋f-. � �d � d Z ddlZddlZddlZddlmZ ddlmZ ddlm Z ddl mZ ddlm Z ddlmZmZ dd lmZ dd lmZ ddlmZ ddlmZmZ dd lmZmZmZmZmZm Z ddlm!Z! e r&ddl"m#Z# ddl"m$Z$ ddl"m%Z% ddl"m&Z& ddl'm(Z( ddlm)Z)m*Z* ed� � Z+dZ,dZ-dd�Z.d� Z/ G d� d� � Z0dS )ze An ASGI middleware. Based on Tom Christie's `sentry-asgi <https://github.com/encode/sentry-asgi>`. � N)�deepcopy)�partial)� TYPE_CHECKING)�continue_trace)�OP)�Hub�_should_send_default_pii)�_filter_headers)�_get_installed_modules)�auto_session_tracking)�SOURCE_FOR_STYLE�TRANSACTION_SOURCE_ROUTE)� ContextVar�event_from_exception�HAS_REAL_CONTEXTVARS�CONTEXTVARS_ERROR_MESSAGE�logger�transaction_from_function)�Transaction)�Dict)�Any)�Optional)�Callable)�Literal)�Event�Hint�sentry_asgi_middleware_appliedzgeneric ASGI request)�endpoint�url�asgic � � | j �;t || j j |dd��� � \ }}| � ||�� � d S d S )NF)�type�handled)�client_options� mechanism)�hint)�clientr �options� capture_event)�hub�exc�mechanism_type�eventr&