
    G)f8                     0    d dl mZ d dlmZ  G d d      Zy)    )Union)
Attributesc                       e Zd ZdZddeeef   deddfdZe	deeef   fd       Z
e	defd       Zd	edefd
ZdefdZy)ObservationzA measurement observed in an asynchronous instrument

    Return/yield instances of this class from asynchronous instrument callbacks.

    Args:
        value: The float or int measured value
        attributes: The measurement's attributes
    Nvalue
attributesreturnc                      || _         || _        y N)_value_attributes)selfr   r   s      n/var/www/html/flask-app/venv/lib/python3.12/site-packages/mysql/opentelemetry/metrics/_internal/observation.py__init__zObservation.__init__   s    %    c                     | j                   S r   )r   r   s    r   r   zObservation.value"   s    {{r   c                     | j                   S r   )r   r   s    r   r   zObservation.attributes&   s    r   otherc                     t        |t              xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r   )
isinstancer   r   r   )r   r   s     r   __eq__zObservation.__eq__*   s=    uk* 4

ekk)45#3#33	
r   c                 <    d| j                    d| j                   dS )NzObservation(value=z, attributes=))r   r   r   s    r   __repr__zObservation.__repr__1   s     #DJJ<}T__<MQOOr   r   )__name__
__module____qualname____doc__r   intfloatr   r   propertyr   r   objectboolr   strr    r   r   r   r      s    &eCJ/ &Z &SW & uUCZ(    J    
F 
t 
P# Pr   r   N)typingr   mysql.opentelemetry.util.typesr   r   r&   r   r   <module>r)      s     5P Pr   