ó
    Ú2‰iÌ  ã                  ó$  • S SK Jr  S SKrS SKrS SKJr  S SKJr  S SKJ	r	  S SK
JrJr  S SKJr  S SKJr  \R"                  " \5      rSS	 jr\" 5       rSS
 jrSSS jjr S       SS jjrSS jrSS jrSS jr\" S5      r\" S5      r/ SQrg)é    )ÚannotationsN)ÚToken)Úenviron)Úuuid4)ÚContextÚ_RuntimeContext)ÚOTEL_PYTHON_CONTEXT)Úentry_pointsc            
     óH  • Sn [         R                  " [        U 5      n [        [	        [        SUS95      5      R                  5       " 5       $ ! [         aI    [        R                  SUU 5        [        [	        [        SU S95      5      R                  5       " 5       s $ f = f)zKInitialize the RuntimeContext

Returns:
    An instance of RuntimeContext.
Úcontextvars_contextÚopentelemetry_context)ÚgroupÚnamez*Failed to load context: %s, fallback to %s)
r   Úgetr	   ÚnextÚiterr
   ÚloadÚ	ExceptionÚloggerÚ	exception)Údefault_contextÚconfigured_contexts     Ú[/home/mande/repo/quber/.venv/lib/python3.13/site-packages/opentelemetry/context/__init__.pyÚ_load_runtime_contextr      s¶   € ð ,€Oä ŸšÔ%8¸/ÓJÐðÜÜÜØ1Ø+ñóó
÷ ‰$‹&ðó ð 	øô ó Ü×ÑØ8ØØô	
ô
 ÜÜØ1Ø(ñóó
÷ ‰$‹&ðó ò 	ðús   Ÿ.A ÁAB!Â B!c                ó4   • U S-   [        [        5       5      -   $ )aI  To allow cross-cutting concern to control access to their local state,
the RuntimeContext API provides a function which takes a keyname as input,
and returns a unique key.
Args:
    keyname: The key name is for debugging purposes and is not required to be unique.
Returns:
    A unique string representing the newly created key.
Ú-)Ústrr   )Úkeynames    r   Ú
create_keyr   I   s   € ð �S‰=œ3œu›w›<Ñ'Ð'ó    c                ó\   • Ub  UR                  U 5      $ [        5       R                  U 5      $ )aV  To access the local state of a concern, the RuntimeContext API
provides a function which takes a context and a key as input,
and returns a value.

Args:
    key: The key of the value to retrieve.
    context: The context from which to retrieve the value, if None, the current context is used.

Returns:
    The value associated with the key.
)r   Úget_current)ÚkeyÚcontexts     r   Ú	get_valuer%   U   s*   € ð  'Ñ2ˆ7�;‰;�sÓÐN¼»×8IÑ8IÈ#Ó8NÐNr    c                óZ   • Uc
  [        5       nUR                  5       nXU '   [        U5      $ )a©  To record the local state of a cross-cutting concern, the
RuntimeContext API provides a function which takes a context, a
key, and a value as input, and returns an updated context
which contains the new value.

Args:
    key: The key of the entry to set.
    value: The value of the entry to set.
    context: The context to copy, if None, the current context is used.

Returns:
    A new `Context` containing the value set.
)r"   Úcopyr   )r#   Úvaluer$   Ú
new_valuess       r   Ú	set_valuer*   d   s-   € ð  �Ü“-ˆØ—‘“€JØˆs�OÜ�:ÓÐr    c                 ó*   • [         R                  5       $ )z¹To access the context associated with program execution,
the Context API provides a function which takes no arguments
and returns a Context.

Returns:
    The current `Context` object.
)Ú_RUNTIME_CONTEXTr"   © r    r   r"   r"   {   s   € ô ×'Ñ'Ó)Ð)r    c                ó,   • [         R                  U 5      $ )zÿAssociates a Context with the caller's current execution unit. Returns
a token that can be used to restore the previous Context.

Args:
    context: The Context to set as current.

Returns:
    A token that can be used with `detach` to reset the context.
)r,   Úattach)r$   s    r   r/   r/   †   s   € ô ×"Ñ" 7Ó+Ð+r    c                óz   •  [         R                  U 5        g! [         a    [        R	                  S5         gf = f)z×Resets the Context associated with the caller's current execution unit
to the value it had before attaching a specified Context.

Args:
    token: The Token that was returned by a previous call to attach a Context.
zFailed to detach contextN)r,   Údetachr   r   r   )Útokens    r   r1   r1   “   s3   € ð5Ü×Ñ Õ&øÜó 5Ü×ÑÐ3Ö4ð5ús   ‚ ˜:¹:Úsuppress_instrumentationÚsuppress_http_instrumentation)r   r/   r   r1   r"   r%   r*   )Úreturnr   )r   r   r5   r   )N)r#   r   r$   útyping.Optional[Context]r5   ú'object')r#   r   r(   r7   r$   r6   r5   r   )r5   r   )r$   r   r5   úToken[Context])r2   r8   r5   ÚNone)Ú
__future__r   ÚloggingÚtypingÚcontextvarsr   Úosr   Úuuidr   Úopentelemetry.context.contextr   r   Ú#opentelemetry.environment_variablesr	   Ú&opentelemetry.util._importlib_metadatar
   Ú	getLoggerÚ__name__r   r   r,   r   r%   r*   r"   r/   r1   Ú_SUPPRESS_INSTRUMENTATION_KEYÚ"_SUPPRESS_HTTP_INSTRUMENTATION_KEYÚ__all__r-   r    r   Ú<module>rH      s¯   ðõ #ã Û Ý Ý Ý ÷ CÝ CÝ ?à	×	Ò	˜8Ó	$€ô$ñN )Ó*Ð ô	(öOð  DHðØ	ðØðØ(@ðàõô.*ô
,ô
5ñ  !+Ð+EÓ FÐ Ù%/Ø#ó&Ð "ò�r    