
    osjh                     0    d dl mZ d dlmZ  G d d      Zy)    )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y)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                 .    || _         || _        || _        y N)_value_attributes_context)selfr   r   r	   s       ^/root/.hermes/venv/lib/python3.12/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              xrO | j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S r   )
isinstancer   r   r   r	   )r   r   s     r   __eq__zObservation.__eq__*   sT    uk* .

ekk).5#3#33. -		
r   c                 V    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/    #DJJ<}T__<MZX\XdXdWeef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{    J     4  
F 
t 
h# hr   r   N)opentelemetry.contextr   opentelemetry.util.typesr   r   r)   r   r   <module>r,      s   
 * /*h *hr   