
    2i                         S SK Jr  S SKJrJrJr  S SKJr  S SKJ	r	J
r
  Sr\" S5      r SS\
S\\   S	\4S
 jjrSS\\   S	\
4S jjrg)    )Optional)
create_key	get_value	set_value)Context)INVALID_SPANSpanzcurrent-spanNspancontextreturnc                 "    [        [        XS9nU$ )zSet the span in the given context.

Args:
    span: The Span to set.
    context: a Context object. if one is not passed, the
        default current context is used instead.
r   )r   	_SPAN_KEY)r
   r   ctxs      b/home/james-whalen/.local/lib/python3.13/site-packages/opentelemetry/trace/propagation/__init__.pyset_span_in_contextr      s     It
5CJ    c                 ^    [        [        U S9nUb  [        U[        5      (       d  [        $ U$ )zRetrieve the current span.

Args:
    context: A Context object. If one is not passed, the
        default current context is used instead.

Returns:
    The Span set in the context if it exists. INVALID_SPAN otherwise.
r   )r   r   
isinstancer	   r   )r   r
   s     r   get_current_spanr   &   s,     Y0D|:dD11Kr   )N)typingr   opentelemetry.contextr   r   r   opentelemetry.context.contextr   opentelemetry.trace.spanr   r	   SPAN_KEYr   r   r    r   r   <module>r      sd     B B 1 7~&	 .2
!'*hw/ 4 r   