HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/mysql/opentelemetry/trace/propagation/__pycache__/__init__.cpython-39.pyc
a

�,�h��@szddlmZddlmZmZmZddlmZddlm	Z	m
Z
dZed�Zd
e
eeed�dd	�Z
deee
d
�dd�ZdS)�)�Optional)�
create_key�	get_value�	set_value)�Context)�INVALID_SPAN�Spanzcurrent-spanN)�span�context�returncCstt||d�}|S)z�Set 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
�ctx�r�a/opt/nydus/tmp/pip-target-wkfpz8uv/lib64/python/mysql/opentelemetry/trace/propagation/__init__.py�set_span_in_contextsr)r
rcCs&tt|d�}|dust|t�s"tS|S)z�Retrieve 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N)rr
�
isinstancerr)r
r	rrr�get_current_span$s
r)N)N)�typingrZmysql.opentelemetry.contextrrrZ#mysql.opentelemetry.context.contextrZmysql.opentelemetry.trace.spanrrZSPAN_KEYr
rrrrrr�<module>s