관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋fR � �F � d Z ddlmZ ddlZddlmZ G d� de� � ZdS )z� raven.contrib.zerorpc ~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. � )�absolute_importN)�Clientc � � e Zd ZdZdd�Zd� ZdS )�SentryMiddlewareal Sentry/Raven middleware for ZeroRPC. >>> import zerorpc >>> from raven.contrib.zerorpc import SentryMiddleware >>> sentry = SentryMiddleware(dsn='udp://..../') >>> zerorpc.Context.get_instance().register_middleware(sentry) Exceptions detected server-side in ZeroRPC will be submitted to Sentry (and propagated to the client as well). TNc �: � |pt di |��| _ || _ dS )a� Create a middleware object that can be injected in a ZeroRPC server. - hide_zerorpc_frames: modify the exception stacktrace to remove the internal zerorpc frames (True by default to make the stacktrace as readable as possible); - client: use an existing raven.Client object, otherwise one will be instantiated from the keyword arguments. N� )r �_sentry_client�_hide_zerorpc_frames)�self�hide_zerorpc_frames�client�kwargss �o/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/raven/contrib/zerorpc/__init__.py�__init__zSentryMiddleware.__init__ s- � � %�8��(8�(8��(8�(8���$7��!�!�!� c �� � | j rO|d }|rE|j }d|j d<