o
    ^i
                     @   s   d Z ddlmZmZmZ ddlmZ zddlmZ	 W n e
y%   dZ	Y nw e	dur=e	dk r=e	ekr=ddlmZmZmZ neddg d	Zed
dZedddgZeddZeddg dZeddZeddZeddZg dZdS )z
Prometheus metrics exported by Jupyter Server

Read https://prometheus.io/docs/practices/naming/ for naming
conventions for metrics & labels.
    )Gauge	HistogramInfo)version_infoN)   )HTTP_REQUEST_DURATION_SECONDSKERNEL_CURRENTLY_RUNNING_TOTAL TERMINAL_CURRENTLY_RUNNING_TOTALhttp_request_duration_secondsz)duration in seconds for all HTTP requests)methodhandlerstatus_code terminal_currently_running_totalz*counter for how many terminals are runningkernel_currently_running_totalz8counter for how many kernels are running labeled by typetypejupyter_serverz"Jupyter Server Version informationjupyter_server_extensionz,Jupyter Server Extension Version Information)nameversionenabled.jupyter_server_last_activity_timestamp_secondsz6Timestamp of last seen activity on this Jupyter Server(jupyter_server_started_timestamp_secondsz1Timestamp of when this Jupyter Server was started&jupyter_server_active_duration_secondsz5Number of seconds this Jupyter Server has been active)r   r	   r   SERVER_INFO)__doc__prometheus_clientr   r   r   jupyter_server._versionr   server_version_infonotebook._versionnotebook_version_infoImportErrornotebook.prometheus.metricsr   r   r	   r   SERVER_EXTENSION_INFOLAST_ACTIVITYSERVER_STARTEDACTIVE_DURATION__all__ r'   r'   \/home/ubuntu/hpml_nyu/venv/lib/python3.10/site-packages/jupyter_server/prometheus/metrics.py<module>   sX    
