§
     ¾<iÌ  ã                  ó  — d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm	Z	 d dl
mZmZ d dlmZ d dlmZ  ej        e¦  «        Zd d„Z e¦   «         Zd!d„Zd"d#d„Z	 d"d$d„Zd%d„Zd&d„Zd'd„Z ed¦  «        Z ed¦  «        Zg d¢ZdS )(é    )ÚannotationsN)ÚToken)Úenviron)Úuuid4)ÚContextÚ_RuntimeContext)ÚOTEL_PYTHON_CONTEXT)Úentry_pointsÚreturnr   c            
     ó¨  — d} t          j        t          | ¦  «        }	  t          t	          t          d|¬¦  «        ¦  «        ¦  «                             ¦   «         ¦   «         S # t          $ rd t           	                    d|| ¦  «          t          t	          t          d| ¬¦  «        ¦  «        ¦  «                             ¦   «         ¦   «         cY S w xY w)zWInitialize 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     ú™/Users/kimhansen/Desktop/03 Workspace/ceo-agents/chl-effectiveness/mcp-servers/whoop/.venv/lib/python3.11/site-packages/opentelemetry/context/__init__.pyÚ_load_runtime_contextr      s	  € ð ,€Oå œÕ%8¸/ÑJÔJÐððtÝÝØ1Ø+ðñ ô ñô ñ
ô 
÷ Š$‰&Œ&ñô ð 	øõ ð ð ð Ý×ÒØ8ØØñ	
ô 	
ð 	
ð
tÝÝØ1Ø(ðñ ô ñô ñ
ô 
÷ Š$‰&Œ&ñô ð 	ð 	ð 	ðøøøs   žAA# Á#A+CÃCÚkeynameÚstrc                óD   — | dz   t          t          ¦   «         ¦  «        z   S )ae  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.
    ú-)r   r   )r   s    r   Ú
create_keyr    I   s   € ð S‰=3u™wœw™<œ<Ñ'Ð'ó    ÚkeyÚcontextútyping.Optional[Context]ú'object'c                ór   — ||                      | ¦  «        n t          ¦   «                               | ¦  «        S )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)r"   r#   s     r   Ú	get_valuer(   U   s2   € ð  'Ð2ˆ7;Š;sÑÔÐ½¹¼×8IÒ8IÈ#Ñ8NÔ8NÐNr!   Úvaluer   c                ór   — |€t          ¦   «         }|                     ¦   «         }||| <   t          |¦  «        S )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"   r)   r#   Ú
new_valuess       r   Ú	set_valuer-   d   s6   € ð  €Ý‘-”-ˆØ—’‘”€JØ€JˆsOÝ:ÑÔÐr!   c                 ó4   — t                                ¦   «         S )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!   úToken[Context]c                ó6   — t                                | ¦  «        S )a  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   r3   r3   †   s   € õ ×"Ò" 7Ñ+Ô+Ð+r!   ÚtokenÚNonec                ó’   — 	 t                                | ¦  «         dS # t          $ r t                               d¦  «         Y dS w xY w)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   )r4   s    r   r7   r7   “   sZ   € ð5Ý×Ò Ñ&Ô&Ð&Ð&Ð&øÝð 5ð 5ð 5Ý×ÒÐ3Ñ4Ô4Ð4Ð4Ð4Ð4ð5øøøs   ‚ ž$AÁAÚsuppress_instrumentationÚsuppress_http_instrumentation)r   r3   r    r7   r'   r(   r-   )r   r   )r   r   r   r   )N)r"   r   r#   r$   r   r%   )r"   r   r)   r%   r#   r$   r   r   )r   r   )r#   r   r   r1   )r4   r1   r   r5   )Ú
__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'   r3   r7   Ú_SUPPRESS_INSTRUMENTATION_KEYÚ"_SUPPRESS_HTTP_INSTRUMENTATION_KEYÚ__all__r0   r!   r   ú<module>rH      s£  ðð #Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð ð CÐ BÐ BÐ BÐ BÐ BÐ BÐ BØ CÐ CÐ CÐ CÐ CÐ CØ ?Ð ?Ð ?Ð ?Ð ?Ð ?à	ˆÔ	˜8Ñ	$Ô	$€ð$ð $ð $ð $ðN )Ð(Ñ*Ô*Ð ð	(ð 	(ð 	(ð 	(ðOð Oð Oð Oð Oð  DHðð ð ð ð ð.*ð *ð *ð *ð
,ð 
,ð 
,ð 
,ð
5ð 
5ð 
5ð 
5ð  !+ 
Ð+EÑ FÔ FÐ Ø%/ ZØ#ñ&ô &Ð "ðð ð €€€r!   