o
    Á¿iL  ã                   @   s¾   U d dl Zd dlZddlmZ dgZdefdd„Zeƒ aee	d< da
eje e	d	< eƒ aejejegdf  e	d
< dejegdf ddfdd„Zejdd„ ƒZdd„ Zdeje fdd„ZdS )é    Né   )ÚforksafeÚget_runtime_idÚreturnc                   C   s
   t  ¡ jS ©N)ÚuuidÚuuid4Úhex© r
   r
   úU/home/ubuntu/.local/lib/python3.10/site-packages/ddtrace/internal/runtime/__init__.pyÚ_generate_runtime_id   s   
r   Ú_RUNTIME_IDÚ_ANCESTOR_RUNTIME_IDÚ_ON_RUNTIME_ID_CHANGEÚcbc                 C   s   t  | ¡ dS )zeRegister a callback to be called when the runtime ID changes.

    This can happen after a fork.
    N)r   Úadd©r   r
   r
   r   Úon_runtime_id_change   s   r   c                  C   s(   t d u rta tƒ atD ]} | tƒ qd S r   )r   r   r   r   r   r
   r
   r   Ú_set_runtime_id    s   
ÿr   c                   C   ó   t S )zŠReturn a unique string identifier for this runtime.

    Do not store this identifier as it can change when, e.g., the process forks.
    )r   r
   r
   r
   r   r   -   s   c                   C   r   )zóReturn the runtime ID of the common ancestor of this process.

    Once this value is set (this will happen after a fork) it will not change
    for the lifetime of the process. This function returns ``None`` for the
    ancestor process.
    )r   r
   r
   r
   r   Úget_ancestor_runtime_id5   s   r   )ÚtypingÚtr   Ú r   Ú__all__Ústrr   r   Ú__annotations__r   ÚOptionalÚsetr   ÚSetÚCallabler   Úregisterr   r   r   r
   r
   r
   r   Ú<module>   s   
 ÿ 	
