관리-도구
편집 파일: views.cpython-311.pyc
� �܋f4 � � � d dl mZ d dlmZ d dlmZ d dlmZ erd dlm Z d dl mZ n # e$ r dZY nw xY w d dl mZ n# eef$ r dZY nw xY wd � Zd � ZdS )� )�OP)�Hub)� TYPE_CHECKING)� _functools)�Any)�iscoroutinefunctionN)�wrap_async_viewc � ���� ddl m} ddlm} ddlm� | j �|j ��fd�}t j �� � ��fd�� � }||_ || _ d S )Nr )�BaseHandler)�SimpleTemplateResponse)�DjangoIntegrationc � �� t j }|� t j d�� � 5 �| � � cd d d � � S # 1 swxY w Y d S )Nzserialize response��op�description)r �current� start_spanr �VIEW_RESPONSE_RENDER)�self�hub� old_renders ��u/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/sentry_sdk/integrations/django/views.py�sentry_patched_renderz*patch_views.<locals>.sentry_patched_render s� �� ��k�� �^�^��&�4H� � � � $� $� �:�d�#�#� $� $� $� $� $� $� $� $� $� $� $� $���� $� $� $� $� $� $s �A�A�Ac � �� �| g|�R i |��}t j }|� �� � }|�F|j r?t �'t � t |� � rt ||� � }nt ||� � }n|}|S )N)r r �get_integration�middleware_spansr r �_wrap_sync_view) r �args�kwargs�callbackr �integration�sentry_wrapped_callbackr �old_make_view_atomics ��r �sentry_patched_make_view_atomicz4patch_views.<locals>.sentry_patched_make_view_atomic( s� �� � (�'��>�t�>�>�>�v�>�>�� �k���)�)�*;�<�<���"�{�'C�"�#�/�#�/�'��1�1� 0� +:�#�x�*H�*H�'�'�*9�#�x�*H�*H�'�'� '/�#�&�&� ) �django.core.handlers.baser �django.template.responser �sentry_sdk.integrations.djangor �make_view_atomic�renderr �wraps)r r r r$ r r# r s @@@r �patch_viewsr, s� ���� � 6�5�5�5�5�5�?�?�?�?�?�?�@�@�@�@�@�@�&�7��'�.�J�$� $� $� $� $� ��*�+�+�'� '� '� '� '� ,�+�'�2 %:��!�#B�K� � � r% c �J � �� t j �� � �� fd�� � }|S )Nc �Z �� �� � � 5 }|j �|j � � � �� t j | j j �� � 5 �| g|�R i |��cd d d � � cd d d � � S # 1 swxY w Y d d d � � d S # 1 swxY w Y d S )Nr )�configure_scope�profile�update_active_thread_idr r �VIEW_RENDER�resolver_match� view_name)�requestr r �sentry_scoper r s ��r r"