
    Xjh                     8    d dl mZ d dlmZ  G d d          ZdS )    )Context)
Attributesc            	           e Zd ZdZ	 	 ddeez  dededz  ddfdZe	deez  fd            Z
e	defd	            Ze	dedz  fd
            ZdedefdZdefdZdS )Observationa!  A 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
        context: The measurement's context
    Nvalue
attributescontextreturnc                 0    || _         || _        || _        d S N)_value_attributes_context)selfr   r   r	   s       h/var/www/FlaskApp/flask-venv/lib/python3.11/site-packages/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   c                     | j         S r   )r   r   s    r   r	   zObservation.context&   s
    }r   otherc                     t          |t                    o/| j        |j        k    o| j        |j        k    o| j        |j        k    S r   )
isinstancer   r   r   r	   )r   r   s     r   __eq__zObservation.__eq__*   sJ    uk** .
ek).5#33. -		
r   c                 8    d| j          d| j         d| j         dS )NzObservation(value=z, attributes=z
, context=))r   r   r	   r   s    r   __repr__zObservation.__repr__2   s+    gDJggT_ggX\Xdggggr   )NN)__name__
__module____qualname____doc__intfloatr   r   r   propertyr   r   r	   objectboolr   strr    r   r   r   r   	   s.         "&"&	   U{    4	 
 
        us{    X  J       X  4    X
F 
t 
 
 
 
h# h h h h h hr   r   N)opentelemetry.contextr   opentelemetry.util.typesr   r   r)   r   r   <module>r,      sg   
 * ) ) ) ) ) / / / / / /*h *h *h *h *h *h *h *h *h *hr   