�
���goL � � � d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZm Z d dl
mZ dZ ej e� � Z
dZ ej e� � ZdZ ej d� � Z ej de� d e� d
�� � Z ej e� � Zdeded
efd�Z G d� de j � � Z G d� de� � Ze� � � Z G d� dej eef � � Z e � � � Z!ddz dz
Z"dZ# G d� dej$ eeeddef � � Z% G d� de� � Z&d Z'd Z( e%e(e'dee!�� � Z) e&e)� � Z*ded
efd �Z+d!ed
efd"�Z,dS )#� N)�Status�
StatusCode)�typeszU[a-z][_0-9a-z\-\*\/]{0,255}|[a-z0-9][_0-9a-z\-\*\/]{0,240}@[a-z][_0-9a-z\-\*\/]{0,13}zA[\x20-\x2b\x2d-\x3c\x3e-\x7e]{0,255}[\x21-\x2b\x2d-\x3c\x3e-\x7e]� z
[ \t]*,[ \t]*�(z)(=)(z)[ ]*�key�value�returnc �� � t | t � � oLt � | � � d uo0t |t � � ot � |� � d uS �N)�
isinstance�str�_KEY_PATTERN� fullmatch�_VALUE_PATTERN)r r s �h/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/opentelemetry/trace/span.py�_is_valid_pairr / s^ � ��3���� 8��"�"�3�'�'�t�3� 8��u�c�"�"� 8�
�$�$�U�+�+�4�7� � c � � e Zd ZdZej d dej e ddfd�� � Z ej d!d�� � Z
ej dej ee
j f ddfd �� � Zej d
ede
j ddfd�� � Zej d"d
ede
j dej e ddfd�� � Z d ddde
j ddfd�Zej d
eddfd�� � Zej defd�� � Zej d dej eef dej e ddfd�� � Zej d#dede
j dej e deddf
d�� � Zd$d�Zdej ej e dej e dej ej ddfd�Z!dS )%�Spanz4A span represents a single operation within a trace.N�end_timer
c � � dS )a
Sets the current time as the span's end time.
The span's end time is the wall time at which the operation finished.
Only the first call to `end` should modify the span, and
implementations are free to ignore or raise on further calls.
N� ��selfr s r �endzSpan.end; � � � � r �SpanContextc � � dS )a Gets the span's SpanContext.
Get an immutable, serializable identifier for this span that can be
used to create new child spans.
Returns:
A :class:`opentelemetry.trace.SpanContext` with a copy of this span's immutable state.
Nr �r s r �get_span_contextzSpan.get_span_contextE r r �
attributesc � � dS )a� Sets Attributes.
Sets Attributes with the key and value passed as arguments dict.
Note: The behavior of `None` value attributes is undefined, and hence
strongly discouraged. It is also preferred to set attributes at span
creation, instead of calling this method later since samplers can only
consider information already present during span creation.
Nr �r r"