관리-도구
편집 파일: client.cpython-311.pyc
� �܋fH � �� � d dl mZ d dlmZ d dlmZ d dlmZ erd dlm Z m Z mZmZm Z d dlZd dlmZmZ d dlmZ d d lmZ d d lmZ n# e$ r ed� � �w xY w G d� d ej ej � � ZdS )� )�Hub)�MYPY)�OP)�DidNotEnable)�Any�Callable�Iterator�Iterable�UnionN)�ClientCallDetails�Call)� _UnaryOutcome)�UnaryStreamCall)�Messagezgrpcio is not installedc �0 � e Zd Zd� Zd� Zed� � � ZdS )�ClientInterceptorc � � t j }|j }|� t j d|z �� � 5 }|� dd� � |� d|� � | � ||� � } |||� � }|� d|� � � j � � |cd d d � � S # 1 swxY w Y d S )Nzunary unary call to %s��op�description�typezunary unary�method�code� r �currentr � start_spanr �GRPC_CLIENT�set_data�-_update_client_call_details_metadata_from_hubr �name��self�continuation�client_call_details�request�hubr �span�responses �t/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/sentry_sdk/integrations/grpc/client.py�intercept_unary_unaryz'ClientInterceptor.intercept_unary_unary s � ��k��$�+�� �^�^��~�+C�f�+L� � � � � ��M�M�&�-�0�0�0��M�M�(�F�+�+�+�"&�"T�"T�#�S�#� #�� $�|�$7��A�A�H��M�M�&�(�-�-�/�/�"6�7�7�7�� � � � � � � � � � � � ���� � � � � � � �A=C�C� Cc � � t j }|j }|� t j d|z �� � 5 }|� dd� � |� d|� � | � ||� � } |||� � }|� d|� � � j � � |cd d d � � S # 1 swxY w Y d S )Nzunary stream call to %sr r zunary streamr r r r! s r) �intercept_unary_streamz(ClientInterceptor.intercept_unary_stream* s � ��k��$�+�� �^�^��~�+D�v�+M� � � � � ��M�M�&�.�1�1�1��M�M�(�F�+�+�+�"&�"T�"T�#�S�#� #�� $�|�#�W�� �H� �M�M�&�(�-�-�/�/�"6�7�7�7�� � � � � � � � � � � � ���� � � � � � r+ c � � | j rt | j � � ng }|� � � D ]\ }}|� ||f� � �t j � | j | j || j | j | j �� � } | S )N)r �timeout�metadata�credentials�wait_for_ready�compression)r0 �list�iter_trace_propagation_headers�append�grpc�_interceptor�_ClientCallDetailsr r/ r1 r2 r3 )r$ r&