
    gF                        U d dl mZmZmZmZmZmZmZ d dlm	Z	m
Z
mZmZmZmZ eee	gee   f   eee   e	df   f   ZdZeed<   	 dedeee      defd	Zd
Zeed<   	 dedefdZdZeed<   	 dedefdZdZeed<   	 dede
fdZdZeed<   	 dedeee      defdZdZeed<   	 dede
fdZdZeed<   	 dede
fdZdZeed<   	 dedefdZ dZ!eed <   	 dede
fd!Z"d"Z#eed#<   	 dede
fd$Z$d%Z%eed&<   	 dede
fd'Z&d(Z'eed)<   	 dedefd*Z(d+Z)eed,<   	 dedefd-Z*d.Z+eed/<   	 dedeee      defd0Z,d1Z-eed2<   	 dedefd3Z.d4Z/eed5<   	 dedefd6Z0d7Z1eed8<   	 dedefd9Z2d:Z3eed;<   	 dedefd<Z4d=Z5eed><   	 dedefd?Z6d@Z7eedA<   	 dedeee      defdBZ8dCZ9eedD<   	 dedefdEZ:dFZ;eedG<   	 dede
fdHZ<dIZ=eedJ<   	 dede
fdKZ>dLZ?eedM<   	 dede
fdNZ@dOZAeedP<   	 dede
fdQZBdRZCeedS<   	 dede
fdTZDdUZEeedV<   	 dede
fdWZFdXZGeedY<   	 dedefdZZHd[ZIeed\<   	 dedeee      defd]ZJd^ZKeed_<   	 dedefd`ZLdaZMeedb<   	 dede
fdcZNddZOeede<   	 dedeee      defdfZPy)g    )CallableFinal	GeneratorIterableOptionalSequenceUnion)CallbackOptionsCounterMeterObservableGaugeObservationUpDownCounterNzsystem.cpu.frequencySYSTEM_CPU_FREQUENCYmeter	callbacksreturnc                 4    | j                  t        |d d      S )z.Reports the current frequency of the CPU in Hzz{Hz}namer   descriptionunit)create_observable_gauger   r   r   s     m/var/www/openai/venv/lib/python3.12/site-packages/opentelemetry/semconv/_incubating/metrics/system_metrics.pycreate_system_cpu_frequencyr   1   s(     ((!D	 )      zsystem.cpu.logical.countSYSTEM_CPU_LOGICAL_COUNTc                 2    | j                  t        d d      S )znReports the number of logical (virtual) processor cores created by the operating system to manage multitasking{cpu}r   r   r   )create_up_down_counterr   r   s    r   create_system_cpu_logical_countr$   E   s&    ''% E (  r   zsystem.cpu.physical.countSYSTEM_CPU_PHYSICAL_COUNTc                 2    | j                  t        d d      S )zEReports the number of actual physical processor cores on the hardwarer    r!   )r"   r%   r#   s    r    create_system_cpu_physical_countr'   V   s#    ''&[ (  r   zsystem.cpu.timeSYSTEM_CPU_TIMEc                 2    | j                  t        d d      S )z+Seconds each logical CPU spent on each modesr!   )create_counterr(   r#   s    r   create_system_cpu_timer,   g   s#    A    r   zsystem.cpu.utilizationSYSTEM_CPU_UTILIZATIONc                 4    | j                  t        |d d      S )zpDifference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs1r   )r   r-   r   s     r   create_system_cpu_utilizationr0   x   s+     ((# G	 )  r   zsystem.disk.ioSYSTEM_DISK_IOc                 2    | j                  t        dd      S N Byr!   )r+   r1   r#   s    r   create_system_disk_ior6      s#        r   zsystem.disk.io_timeSYSTEM_DISK_IO_TIMEc                 2    | j                  t        d d      S )zTime disk spent activatedr*   r!   )r+   r7   r#   s    r   create_system_disk_io_timer9      s#     /    r   zsystem.disk.limitSYSTEM_DISK_LIMITc                 2    | j                  t        d d      S )z&The total storage capacity of the diskr5   r!   )r"   r:   r#   s    r   create_system_disk_limitr<      s#    ''< (  r   zsystem.disk.mergedSYSTEM_DISK_MERGEDc                 2    | j                  t        dd      S Nr4   z{operation}r!   )r+   r=   r#   s    r   create_system_disk_mergedr@      s#        r   zsystem.disk.operation_timeSYSTEM_DISK_OPERATION_TIMEc                 2    | j                  t        d d      S )z/Sum of the time each operation took to completer*   r!   )r+   rA   r#   s    r   !create_system_disk_operation_timerC      s#    'E    r   zsystem.disk.operationsSYSTEM_DISK_OPERATIONSc                 2    | j                  t        dd      S r?   )r+   rD   r#   s    r   create_system_disk_operationsrF      s#    #    r   zsystem.filesystem.limitSYSTEM_FILESYSTEM_LIMITc                 2    | j                  t        d d      S )z,The total storage capacity of the filesystemr5   r!   )r"   rG   r#   s    r   create_system_filesystem_limitrI      s#    ''$B (  r   zsystem.filesystem.usageSYSTEM_FILESYSTEM_USAGEc                 2    | j                  t        dd      S )z:Reports a filesystem's space usage across different statesz;Reports a filesystem's space usage across different states.r5   r!   )r"   rJ   r#   s    r   create_system_filesystem_usagerL   	  s#    ''$Q (  r   zsystem.filesystem.utilizationSYSTEM_FILESYSTEM_UTILIZATIONc                 4    | j                  t        |dd      S Nr4   r/   r   )r   rM   r   s     r   $create_system_filesystem_utilizationrP     s(     ((*	 )  r   zsystem.linux.memory.availableSYSTEM_LINUX_MEMORY_AVAILABLEc                 2    | j                  t        d d      S )zcAn estimate of how much memory is available for starting new applications, without causing swappingr5   r!   )r"   rQ   r#   s    r   $create_system_linux_memory_availablerS   1  s#    ''*y (  r   zsystem.linux.memory.slab.usageSYSTEM_LINUX_MEMORY_SLAB_USAGEc                 2    | j                  t        dd      S )zZReports the memory used by the Linux kernel for managing caches of frequently used objectsz[Reports the memory used by the Linux kernel for managing caches of frequently used objects.r5   r!   )r"   rT   r#   s    r   %create_system_linux_memory_slab_usagerV   E  s#    ''+q (  r   zsystem.memory.limitSYSTEM_MEMORY_LIMITc                 2    | j                  t        dd      S )z$Total memory available in the systemz%Total memory available in the system.r5   r!   )r"   rW   r#   s    r   create_system_memory_limitrY   W  s#    '' ; (  r   zsystem.memory.sharedSYSTEM_MEMORY_SHAREDc                 2    | j                  t        dd      S )z$Shared memory used (mostly by tmpfs)z%Shared memory used (mostly by tmpfs).r5   r!   )r"   rZ   r#   s    r   create_system_memory_sharedr\   j  s#    ''!; (  r   zsystem.memory.usageSYSTEM_MEMORY_USAGEc                 2    | j                  t        dd      S )zReports memory in use by statezReports memory in use by state.r5   r!   )r"   r]   r#   s    r   create_system_memory_usager_   }  s#    '' 5 (  r   zsystem.memory.utilizationSYSTEM_MEMORY_UTILIZATIONc                 4    | j                  t        |dd      S rO   )r   r`   r   s     r    create_system_memory_utilizationrb     (     ((&	 )  r   zsystem.network.connectionsSYSTEM_NETWORK_CONNECTIONSc                 2    | j                  t        dd      S )Nr4   z{connection}r!   )r"   rd   r#   s    r   !create_system_network_connectionsrf     s#    ''' (  r   zsystem.network.droppedSYSTEM_NETWORK_DROPPEDc                 2    | j                  t        d d      S )zMCount of packets that are dropped or discarded even though there was no error{packet}r!   )r+   rg   r#   s    r   create_system_network_droppedrj     s#    #c    r   zsystem.network.errorsSYSTEM_NETWORK_ERRORSc                 2    | j                  t        d d      S )z Count of network errors detectedz{error}r!   )r+   rk   r#   s    r   create_system_network_errorsrm     s#    "6    r   zsystem.network.ioSYSTEM_NETWORK_IOc                 2    | j                  t        dd      S r3   )r+   rn   r#   s    r   create_system_network_iorp     s#        r   zsystem.network.packetsSYSTEM_NETWORK_PACKETSc                 2    | j                  t        dd      S )Nr4   ri   r!   )r+   rq   r#   s    r   create_system_network_packetsrs     s#    #    r   zsystem.paging.faultsSYSTEM_PAGING_FAULTSc                 2    | j                  t        dd      S )Nr4   z{fault}r!   )r+   rt   r#   s    r   create_system_paging_faultsrv     s#    !    r   zsystem.paging.operationsSYSTEM_PAGING_OPERATIONSc                 2    | j                  t        dd      S r?   )r+   rw   r#   s    r   create_system_paging_operationsry     s#    %    r   zsystem.paging.usageSYSTEM_PAGING_USAGEc                 2    | j                  t        d d      S )z#Unix swap or windows pagefile usager5   r!   )r"   rz   r#   s    r   create_system_paging_usager|     s#    '' 9 (  r   zsystem.paging.utilizationSYSTEM_PAGING_UTILIZATIONc                 4    | j                  t        |dd      S rO   )r   r}   r   s     r    create_system_paging_utilizationr   '  rc   r   zsystem.process.countSYSTEM_PROCESS_COUNTc                 2    | j                  t        d d      S )z'Total number of processes in each state	{process}r!   )r"   r   r#   s    r   create_system_process_countr   :  s#    ''!= (  r   zsystem.process.createdSYSTEM_PROCESS_CREATEDc                 2    | j                  t        d d      S )z9Total number of processes created over uptime of the hostr   r!   )r+   r   r#   s    r   create_system_process_createdr   K  s#    #O    r   zsystem.uptimeSYSTEM_UPTIMEc                 4    | j                  t        |d d      S )z$The time the system has been runningr*   r   )r   r   r   s     r   create_system_uptimer   ^  s(     ((:	 )  r   )Qtypingr   r   r   r   r   r   r	   opentelemetry.metricsr
   r   r   r   r   r   	CallbackTr   __annotations__r   r   r$   r%   r'   r(   r,   r-   r0   r1   r6   r7   r9   r:   r<   r=   r@   rA   rC   rD   rF   rG   rI   rJ   rL   rM   rP   rQ   rS   rT   rV   rW   rY   rZ   r\   r]   r_   r`   rb   rd   rf   rg   rj   rk   rm   rn   rp   rq   rs   rt   rv   rw   ry   rz   r|   r}   r   r   r   r   r   r   r    r   r   <module>r      sr       o 556h{#_d:;=	
 5 e 4		%hy&9:		 #= % <5 ]  $? 5 >E m  + *% G  !9  8		%hy&9:		 ) ( 7  3 U 2
e   / 5 .E m  1 E 0U w  %A E @U w  !9  8 7  ";  :% M  ";  :% M  (G u F%hy&9: (G u F	 -  )I  H =  3 U 2e   5 e 4u   3 U 2e   $? 5 >%hy&9: %A E @U }  !9  8	 7   7 u 6	 '  / 5 .E g  !9  8 7  5 e 4u   #= % <5 W  3 U 2e   $? 5 >%hy&9: 5 e 4u   !9  8 7  'u &		%hy&9:		r   