o
    pi                     @   sF  U d dl mZ d dlmZmZmZ dZeed< 	 dedefddZd	Z	eed
< 	 dedefddZ
dZeed< 	 dedefddZdZeed< 	 dedefddZdZeed< 	 dedefddZdZeed< 	 dedefddZdZeed< 	 dedefdd Zd!Zeed"< 	 dedefd#d$Zd%Zeed&< 	 dedefd'd(Zd)S )*    )Final)Counter	HistogramMeterzfaas.coldstartsFAAS_COLDSTARTSmeterreturnc                 C      | j tdddS )z Number of invocation cold startsz!Number of invocation cold starts.z{coldstart}namedescriptionunit)create_counterr   r    r   j/home/ubuntu/.local/lib/python3.10/site-packages/opentelemetry/semconv/_incubating/metrics/faas_metrics.pycreate_faas_coldstarts   
   r   zfaas.cpu_usageFAAS_CPU_USAGEc                 C   r	   )z(Distribution of CPU usage per invocationz)Distribution of CPU usage per invocation.sr
   )create_histogramr   r   r   r   r   create_faas_cpu_usage-   r   r   zfaas.errorsFAAS_ERRORSc                 C   r	   )zNumber of invocation errorszNumber of invocation errors.z{error}r
   )r   r   r   r   r   r   create_faas_errors>   r   r   zfaas.init_durationFAAS_INIT_DURATIONc                 C   r	   )zLMeasures the duration of the function's initialization, such as a cold startzMMeasures the duration of the function's initialization, such as a cold start.r   r
   )r   r   r   r   r   r   create_faas_init_durationO   r   r   zfaas.invocationsFAAS_INVOCATIONSc                 C   r	   )z Number of successful invocationsz!Number of successful invocations.z{invocation}r
   )r   r   r   r   r   r   create_faas_invocations`   r   r   zfaas.invoke_durationFAAS_INVOKE_DURATIONc                 C   r	   )z7Measures the duration of the function's logic executionz8Measures the duration of the function's logic execution.r   r
   )r   r   r   r   r   r   create_faas_invoke_durationq   r   r   zfaas.mem_usageFAAS_MEM_USAGEc                 C   r	   )z/Distribution of max memory usage per invocationz0Distribution of max memory usage per invocation.Byr
   )r   r    r   r   r   r   create_faas_mem_usage   r   r"   zfaas.net_ioFAAS_NET_IOc                 C   r	   )z,Distribution of net I/O usage per invocationz-Distribution of net I/O usage per invocation.r!   r
   )r   r#   r   r   r   r   create_faas_net_io   r   r$   zfaas.timeoutsFAAS_TIMEOUTSc                 C   r	   )zNumber of invocation timeoutszNumber of invocation timeouts.z	{timeout}r
   )r   r%   r   r   r   r   create_faas_timeouts   r   r&   N)typingr   opentelemetry.metricsr   r   r   r   __annotations__r   r   r   r   r   r   r   r   r   r   r   r    r"   r#   r$   r%   r&   r   r   r   r   <module>   s:   								