o
    piT                     @   s  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	d
ZdZeed< 	 dedeee  defddZdZeed< 	 dedeee  defddZdZeed< 	 dedeee  defddZdZeed< 	 dedee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ee  defd%d&Z d'Z!eed(< 	 dedeee  defd)d*Z"d+Z#eed,< 	 dedeee  defd-d.Z$d/Z%eed0< 	 dede
fd1d2Z&d3Z'eed4< 	 dedefd5d6Z(d7Z)eed8< 	 dedefd9d:Z*d;Z+eed<< 	 dedeee  defd=d>Z,d?Z-eed@< 	 dedeee  defdAdBZ.dCZ/eedD< 	 dedeee  defdEdFZ0dGZ1eedH< 	 dede
fdIdJZ2dKZ3eedL< 	 dedeee  defdMdNZ4dOZ5eedP< 	 dedeee  defdQdRZ6dSZ7eedT< 	 dedefdUdVZ8dWZ9eedX< 	 dedefdYdZZ:d[Z;eed\< 	 dedeee  defd]d^Z<d_Z=eed`< 	 dedefdadbZ>dcZ?eedd< 	 dedefdedfZ@dgZAeedh< 	 dedeee  defdidjZBdkZCeedl< 	 dede
fdmdnZDdoZEeedp< 	 dede
fdqdrZFdsZGeedt< 	 dedefdudvZHdwZIeedx< 	 dedeee  defdydzZJd{ZKeed|< 	 dedefd}d~ZLdZMeed< 	 dedeee  defddZNdZOeed< 	 dedeee  defddZPdZQeed< 	 dedefddZRdZSeed< 	 dedefddZTdZUeed< 	 dedeee  defddZVdZWeed< 	 dedefddZXdZYeed< 	 dede
fddZZdZ[eed< 	 dedeee  defddZ\dZ]eed< 	 dedeee  defddZ^dZ_eed< 	 dedeee  defddZ`dZaeed< 	 dedeee  defddZbdZceed< 	 dedeee  defddZddS )    )CallableFinal	GeneratorIterableOptionalSequenceUnion)CallbackOptionsCounterMeterObservableGaugeObservationUpDownCounterNzhw.battery.chargeHW_BATTERY_CHARGEmeter	callbacksreturnc                 C      | j t|dddS )z$Remaining fraction of battery chargez%Remaining fraction of battery charge.1namer   descriptionunit)create_observable_gauger   r   r    r   h/home/ubuntu/.local/lib/python3.10/site-packages/opentelemetry/semconv/_incubating/metrics/hw_metrics.pycreate_hw_battery_charge1      r   zhw.battery.charge.limitHW_BATTERY_CHARGE_LIMITc                 C   r   )zALower limit of battery charge fraction to ensure proper operationzBLower limit of battery charge fraction to ensure proper operation.r   r   )r   r   r   r   r   r   create_hw_battery_charge_limitE   r   r    zhw.battery.time_leftHW_BATTERY_TIME_LEFTc                 C   r   )z<Time left before battery is completely charged or dischargedz=Time left before battery is completely charged or discharged.sr   )r   r!   r   r   r   r   create_hw_battery_time_leftY   r   r#   zhw.cpu.speedHW_CPU_SPEEDc                 C   r   )zCPU current frequencyzCPU current frequency.Hzr   )r   r$   r   r   r   r   create_hw_cpu_speedm   r   r&   zhw.cpu.speed.limitHW_CPU_SPEED_LIMITc                 C   r   )zCPU maximum frequencyzCPU maximum frequency.r%   r   )r   r'   r   r   r   r   create_hw_cpu_speed_limit   r   r(   z	hw.energy	HW_ENERGYc                 C      | j tdddS )z Energy consumed by the componentz!Energy consumed by the component.Jr   r   r   )create_counterr)   r   r   r   r   create_hw_energy   
   r/   z	hw.errors	HW_ERRORSc                 C   r*   )z-Number of errors encountered by the componentz.Number of errors encountered by the component.z{error}r,   )r-   r1   r.   r   r   r   create_hw_errors   r0   r2   zhw.fan.speedHW_FAN_SPEEDc                 C   r   )z#Fan speed in revolutions per minutez$Fan speed in revolutions per minute.rpmr   )r   r3   r   r   r   r   create_hw_fan_speed   r   r5   zhw.fan.speed.limitHW_FAN_SPEED_LIMITc                 C   r   )zSpeed limit in rpmzSpeed limit in rpm.r4   r   )r   r6   r   r   r   r   create_hw_fan_speed_limit   r   r7   zhw.fan.speed_ratioHW_FAN_SPEED_RATIOc                 C   r   )z6Fan speed expressed as a fraction of its maximum speedz7Fan speed expressed as a fraction of its maximum speed.r   r   )r   r8   r   r   r   r   create_hw_fan_speed_ratio   r   r9   z	hw.gpu.io	HW_GPU_IOc                 C   r*   )z)Received and transmitted bytes by the GPUz*Received and transmitted bytes by the GPU.Byr,   )r-   r:   r.   r   r   r   create_hw_gpu_io   r0   r<   zhw.gpu.memory.limitHW_GPU_MEMORY_LIMITc                 C   r*   )zSize of the GPU memoryzSize of the GPU memory.r;   r,   )create_up_down_counterr=   r.   r   r   r   create_hw_gpu_memory_limit  r0   r?   zhw.gpu.memory.usageHW_GPU_MEMORY_USAGEc                 C   r*   )zGPU memory usedzGPU memory used.r;   r,   )r>   r@   r.   r   r   r   create_hw_gpu_memory_usage  r0   rA   zhw.gpu.memory.utilizationHW_GPU_MEMORY_UTILIZATIONc                 C   r   )zFraction of GPU memory usedzFraction of GPU memory used.r   r   )r   rB   r   r   r   r    create_hw_gpu_memory_utilization&  r   rC   zhw.gpu.utilizationHW_GPU_UTILIZATIONc                 C   r   )z)Fraction of time spent in a specific taskz*Fraction of time spent in a specific task.r   r   )r   rD   r   r   r   r   create_hw_gpu_utilization:  r   rE   zhw.host.ambient_temperatureHW_HOST_AMBIENT_TEMPERATUREc                 C   r   )z3Ambient (external) temperature of the physical hostz4Ambient (external) temperature of the physical host.Celr   )r   rF   r   r   r   r   "create_hw_host_ambient_temperatureN  r   rH   zhw.host.energyHW_HOST_ENERGYc                 C   r*   )z<Total energy consumed by the entire physical host, in joulesz=Total energy consumed by the entire physical host, in joules.r+   r,   )r-   rI   r.   r   r   r   create_hw_host_energyc  r0   rJ   zhw.host.heating_marginHW_HOST_HEATING_MARGINc                 C   r   )zBy how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensorszBy how many degrees Celsius the temperature of the physical host can be increased, before reaching a warning threshold on one of the internal sensors.rG   r   )r   rK   r   r   r   r   create_hw_host_heating_margint  r   rL   zhw.host.powerHW_HOST_POWERc                 C   r   )zaInstantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred)zbInstantaneous power consumed by the entire physical host in Watts (`hw.host.energy` is preferred).Wr   )r   rM   r   r   r   r   create_hw_host_power  r   rO   zhw.logical_disk.limitHW_LOGICAL_DISK_LIMITc                 C   r*   )zSize of the logical diskzSize of the logical disk.r;   r,   )r>   rP   r.   r   r   r   create_hw_logical_disk_limit  r0   rQ   zhw.logical_disk.usageHW_LOGICAL_DISK_USAGEc                 C   r*   )zLogical disk space usagezLogical disk space usage.r;   r,   )r>   rR   r.   r   r   r   create_hw_logical_disk_usage  r0   rS   zhw.logical_disk.utilizationHW_LOGICAL_DISK_UTILIZATIONc                 C   r   )z,Logical disk space utilization as a fractionz-Logical disk space utilization as a fraction.r   r   )r   rT   r   r   r   r   "create_hw_logical_disk_utilization  r   rU   zhw.memory.sizeHW_MEMORY_SIZEc                 C   r*   )zSize of the memory modulezSize of the memory module.r;   r,   )r>   rV   r.   r   r   r   create_hw_memory_size  r0   rW   zhw.network.bandwidth.limitHW_NETWORK_BANDWIDTH_LIMITc                 C   r*   )z
Link speedzLink speed.zBy/sr,   )r>   rX   r.   r   r   r   !create_hw_network_bandwidth_limit  r0   rY   z hw.network.bandwidth.utilization HW_NETWORK_BANDWIDTH_UTILIZATIONc                 C   r   )z2Utilization of the network bandwidth as a fractionz3Utilization of the network bandwidth as a fraction.r   r   )r   rZ   r   r   r   r   'create_hw_network_bandwidth_utilization  r   r[   zhw.network.ioHW_NETWORK_IOc                 C   r*   )z1Received and transmitted network traffic in bytesz2Received and transmitted network traffic in bytes.r;   r,   )r-   r\   r.   r   r   r   create_hw_network_io	  r0   r]   zhw.network.packetsHW_NETWORK_PACKETSc                 C   r*   )z?Received and transmitted network traffic in packets (or frames)z@Received and transmitted network traffic in packets (or frames).z{packet}r,   )r-   r^   r.   r   r   r   create_hw_network_packets  r0   r_   zhw.network.upHW_NETWORK_UPc                 C   r*   )z#Link status: `1` (up) or `0` (down)z$Link status: `1` (up) or `0` (down).r   r,   )r>   r`   r.   r   r   r   create_hw_network_up+  r0   ra   z&hw.physical_disk.endurance_utilization&HW_PHYSICAL_DISK_ENDURANCE_UTILIZATIONc                 C   r   )z%Endurance remaining for this SSD diskz&Endurance remaining for this SSD disk.r   r   )r   rb   r   r   r   r   -create_hw_physical_disk_endurance_utilization>  r   rc   zhw.physical_disk.sizeHW_PHYSICAL_DISK_SIZEc                 C   r*   )zSize of the diskzSize of the disk.r;   r,   )r>   rd   r.   r   r   r   create_hw_physical_disk_sizeR  r0   re   zhw.physical_disk.smartHW_PHYSICAL_DISK_SMARTc                 C   r   )zValue of the corresponding [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) (Self-Monitoring, Analysis, and Reporting Technology) attributezValue of the corresponding [S.M.A.R.T.](https://wikipedia.org/wiki/S.M.A.R.T.) (Self-Monitoring, Analysis, and Reporting Technology) attribute.r   r   )r   rf   r   r   r   r   create_hw_physical_disk_smartc  r   rg   zhw.powerHW_POWERc                 C   r   )z-Instantaneous power consumed by the componentz.Instantaneous power consumed by the component.rN   r   )r   rh   r   r   r   r   create_hw_powerx  r   ri   zhw.power_supply.limitHW_POWER_SUPPLY_LIMITc                 C   r*   )z(Maximum power output of the power supplyz)Maximum power output of the power supply.rN   r,   )r>   rj   r.   r   r   r   create_hw_power_supply_limit  r0   rk   zhw.power_supply.usageHW_POWER_SUPPLY_USAGEc                 C   r*   )z(Current power output of the power supplyz)Current power output of the power supply.rN   r,   )r>   rl   r.   r   r   r   create_hw_power_supply_usage  r0   rm   zhw.power_supply.utilizationHW_POWER_SUPPLY_UTILIZATIONc                 C   r   )zCUtilization of the power supply as a fraction of its maximum outputzDUtilization of the power supply as a fraction of its maximum output.r   r   )r   rn   r   r   r   r   "create_hw_power_supply_utilization  r   ro   z	hw.status	HW_STATUSc                 C   r*   )zMOperational status: `1` (true) or `0` (false) for each of the possible stateszNOperational status: `1` (true) or `0` (false) for each of the possible states.r   r,   )r>   rp   r.   r   r   r   create_hw_status  r0   rq   zhw.tape_drive.operationsHW_TAPE_DRIVE_OPERATIONSc                 C   r*   )z&Operations performed by the tape drivez'Operations performed by the tape drive.z{operation}r,   )r-   rr   r.   r   r   r   create_hw_tape_drive_operations  r0   rs   zhw.temperatureHW_TEMPERATUREc                 C   r   )zTemperature in degrees CelsiuszTemperature in degrees Celsius.rG   r   )r   rt   r   r   r   r   create_hw_temperature  r   ru   zhw.temperature.limitHW_TEMPERATURE_LIMITc                 C   r   )z$Temperature limit in degrees Celsiusz%Temperature limit in degrees Celsius.rG   r   )r   rv   r   r   r   r   create_hw_temperature_limit  r   rw   z
hw.voltage
HW_VOLTAGEc                 C   r   )zVoltage measured by the sensorzVoltage measured by the sensor.Vr   )r   rx   r   r   r   r   create_hw_voltage  r   rz   zhw.voltage.limitHW_VOLTAGE_LIMITc                 C   r   )zVoltage limit in VoltszVoltage limit in Volts.ry   r   )r   r{   r   r   r   r   create_hw_voltage_limit!  r   r|   zhw.voltage.nominalHW_VOLTAGE_NOMINALc                 C   r   )zNominal (expected) voltagezNominal (expected) voltage.ry   r   )r   r}   r   r   r   r   create_hw_voltage_nominal5  r   r~   )etypingr   r   r   r   r   r   r   opentelemetry.metricsr	   r
   r   r   r   r   	CallbackTr   __annotations__r   r   r    r!   r#   r$   r&   r'   r(   r)   r/   r1   r2   r3   r5   r6   r7   r8   r9   r:   r<   r=   r?   r@   rA   rB   rC   rD   rE   rF   rH   rI   rJ   rK   rL   rM   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   rz   r{   r|   r}   r~   r   r   r   r   <module>   s,  & 











		





			





	



		

		

		



	



		

		








