o
    ¨Ýjl  ã                   @   sb   d dl mZ d dl mZ d dl mZ d dl mZ d dl mZ d dlmZ 		
ddd„Zdd„ Z	dS )é    )Úhttp)Úwsgi)Úgreenthread)Úlog)Úapi)ÚZipkinClientú	127.0.0.1éÂ$  Fç      ð?c                 C   s:   t | |ƒt_t |¡ t ¡  t ¡  |rt ¡  dS dS )aŽ   Apply monkey patch to trace your WSGI application.

    :param host: Scribe daemon IP address (default: '127.0.0.1')
    :param port: Scribe daemon port (default: 9410)
    :param trace_app_log: A Boolean indicating if the tracer will trace
        application log together or not. This facility assume that
        your application uses python standard logging library.
        (default: False)
    :param sampling_rate: A Float value (0.0~1.0) that indicates
        the tracing frequency. If you specify 1.0, all request
        are traced (and sent to Zipkin collecotr).
        If you specify 0.1, only 1/10 requests are traced. (default: 1.0)
    N)r   r   Úclientr   Úpatchr   r   r   )ÚhostÚportZtrace_app_logZsampling_rate© r   úR/var/www/html/chatgpt/venv/lib/python3.10/site-packages/eventlet/zipkin/patcher.pyÚenable_trace_patch	   s   
ÿr   c                   C   s.   t  ¡  t ¡  t ¡  t ¡  tj ¡  d S )N)r   Zunpatchr   r   r   r   r   Úcloser   r   r   r   Údisable_trace_patch$   s
   r   N)r   r	   Fr
   )
Zeventlet.zipkinr   r   r   r   r   Zeventlet.zipkin.clientr   r   r   r   r   r   r   Ú<module>   s    
ÿ