
    gx                         d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	  ee
      Z G d de      Z G d d	e      Zdd	gZy
)z*
OpenTelemetry Base Distribution (Distro)
    )ABCabstractmethod)	getLogger)BaseInstrumentor)
EntryPointc                   <    e Zd ZdZdZd Zed        Zd Zde	fdZ
y)
BaseDistrozAn ABC for distroNc                 n    | j                   t        j                  | g|i || _         | j                   S N)	_instanceobject__new__)clsargskwargss      Y/var/www/openai/venv/lib/python3.12/site-packages/opentelemetry/instrumentation/distro.pyr   zBaseDistro.__new__"   s0    == "NN3@@@CM}}    c                      y)Configure the distributionN selfr   s     r   
_configurezBaseDistro._configure(   s    r   c                 (     | j                   di | y)r   Nr   )r   r   s     r   	configurezBaseDistro.configure,   s    !&!r   entry_pointc                 R    |j                         }  |       j                  di | y)a  Takes an instrumentation entry point and activates it by instantiating
        and calling instrument() on it.
        This is called for each opentelemetry_instrumentor entry point by auto
        instrumentation.

        Distros can override this method to customize the behavior by
        inspecting each entry point and configuring them in special ways,
        passing additional arguments, load a replacement/fork instead,
        skip loading entirely, etc.
        Nr   )load
instrument)r   r   r   instrumentors       r   load_instrumentorzBaseDistro.load_instrumentor0   s'     *5)9)9);!!!+F+r   )__name__
__module____qualname____doc__r   r   r   r   r   r   r!   r   r   r   r	   r	      s5    I ) )",%,r   r	   c                       e Zd Zd Zy)DefaultDistroc                      y r   r   r   s     r   r   zDefaultDistro._configureB   s    r   N)r"   r#   r$   r   r   r   r   r'   r'   A   s    r   r'   N)r%   abcr   r   loggingr   *opentelemetry.instrumentation.instrumentorr   &opentelemetry.util._importlib_metadatar   r"   _LOGr	   r'   __all__r   r   r   <module>r/      sG     $  G =!, !,HJ 
 
)r   