o
    PDi*                     @   s  U d dl mZ d dlmZ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)Zeed*< 	 dedefd+d,Zd-Zeed.< 	 dedefd/d0Zd1Zeed2< 	 dedefd3d4Zd5Z eed6< 	 dedefd7d8Z!d9Z"eed:< 	 dedefd;d<Z#d=Z$eed>< 	 dedefd?d@Z%dAZ&eedB< 	 dedefdCdDZ'dEZ(eedF< 	 dedefdGdHZ)dIZ*eedJ< 	 dedefdKdLZ+dMZ,eedN< 	 dedefdOdPZ-dQS )R    )Final)Counter	HistogramMeterUpDownCounterzdb.client.connection.countDB_CLIENT_CONNECTION_COUNTmeterreturnc                 C      | j td ddS )zXThe number of connections that are currently in state described by the `state` attribute{connection}namedescriptionunit)create_up_down_counterr   r    r   m/var/www/Datamplify/venv/lib/python3.10/site-packages/opentelemetry/semconv/_incubating/metrics/db_metrics.py!create_db_client_connection_count   
   r   z db.client.connection.create_time DB_CLIENT_CONNECTION_CREATE_TIMEc                 C   r
   )z+The time it took to create a new connectionsr   )create_histogramr   r   r   r   r   'create_db_client_connection_create_time-   r   r   zdb.client.connection.idle.maxDB_CLIENT_CONNECTION_IDLE_MAXc                 C   r
   )z3The maximum number of idle open connections allowedr   r   )r   r   r   r   r   r   $create_db_client_connection_idle_max>   r   r   zdb.client.connection.idle.minDB_CLIENT_CONNECTION_IDLE_MINc                 C   r
   )z3The minimum number of idle open connections allowedr   r   )r   r   r   r   r   r   $create_db_client_connection_idle_minO   r   r   zdb.client.connection.maxDB_CLIENT_CONNECTION_MAXc                 C   r
   )z.The maximum number of open connections allowedr   r   )r   r   r   r   r   r   create_db_client_connection_max`   r   r   z%db.client.connection.pending_requests%DB_CLIENT_CONNECTION_PENDING_REQUESTSc                 C   r
   )zUThe number of pending requests for an open connection, cumulative for the entire pool	{request}r   )r   r    r   r   r   r   ,create_db_client_connection_pending_requestss   
   r"   zdb.client.connection.timeoutsDB_CLIENT_CONNECTION_TIMEOUTSc                 C   r
   )z`The number of connection timeouts that have occurred trying to obtain a connection from the pool	{timeout}r   )create_counterr$   r   r   r   r   $create_db_client_connection_timeouts   r   r'   zdb.client.connection.use_timeDB_CLIENT_CONNECTION_USE_TIMEc                 C   r
   )zDThe time between borrowing a connection and returning it to the poolr   r   )r   r(   r   r   r   r   $create_db_client_connection_use_time   r   r)   zdb.client.connection.wait_timeDB_CLIENT_CONNECTION_WAIT_TIMEc                 C   r
   )z;The time it took to obtain an open connection from the poolr   r   )r   r*   r   r   r   r   %create_db_client_connection_wait_time   r   r+   z!db.client.connections.create_time!DB_CLIENT_CONNECTIONS_CREATE_TIMEc                 C      | j tdddS )zhDeprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`ziDeprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`.msr   )r   r,   r   r   r   r   (create_db_client_connections_create_time   r   r/   zdb.client.connections.idle.maxDB_CLIENT_CONNECTIONS_IDLE_MAXc                 C   r-   )z7Deprecated, use `db.client.connection.idle.max` insteadz8Deprecated, use `db.client.connection.idle.max` instead.r   r   )r   r0   r   r   r   r   %create_db_client_connections_idle_max   r   r1   zdb.client.connections.idle.minDB_CLIENT_CONNECTIONS_IDLE_MINc                 C   r-   )z7Deprecated, use `db.client.connection.idle.min` insteadz8Deprecated, use `db.client.connection.idle.min` instead.r   r   )r   r2   r   r   r   r   %create_db_client_connections_idle_min   r   r3   zdb.client.connections.maxDB_CLIENT_CONNECTIONS_MAXc                 C   r-   )z2Deprecated, use `db.client.connection.max` insteadz3Deprecated, use `db.client.connection.max` instead.r   r   )r   r4   r   r   r   r    create_db_client_connections_max   r   r5   z&db.client.connections.pending_requests&DB_CLIENT_CONNECTIONS_PENDING_REQUESTSc                 C   r-   )z?Deprecated, use `db.client.connection.pending_requests` insteadz@Deprecated, use `db.client.connection.pending_requests` instead.r!   r   )r   r6   r   r   r   r   -create_db_client_connections_pending_requests   r#   r7   zdb.client.connections.timeoutsDB_CLIENT_CONNECTIONS_TIMEOUTSc                 C   r-   )z7Deprecated, use `db.client.connection.timeouts` insteadz8Deprecated, use `db.client.connection.timeouts` instead.r%   r   )r&   r8   r   r   r   r   %create_db_client_connections_timeouts  r   r9   zdb.client.connections.usageDB_CLIENT_CONNECTIONS_USAGEc                 C   r-   )z4Deprecated, use `db.client.connection.count` insteadz5Deprecated, use `db.client.connection.count` instead.r   r   )r   r:   r   r   r   r   "create_db_client_connections_usage  r   r;   zdb.client.connections.use_timeDB_CLIENT_CONNECTIONS_USE_TIMEc                 C   r-   )zeDeprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`zfDeprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`.r.   r   )r   r<   r   r   r   r   %create_db_client_connections_use_time$  r   r=   zdb.client.connections.wait_timeDB_CLIENT_CONNECTIONS_WAIT_TIMEc                 C   r-   )zfDeprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`zgDeprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`.r.   r   )r   r>   r   r   r   r   &create_db_client_connections_wait_time3  r   r?   zdb.client.operation.durationDB_CLIENT_OPERATION_DURATIONc                 C   r-   )z&Duration of database client operationsz'Duration of database client operations.r   r   )r   r@   r   r   r   r   #create_db_client_operation_durationE  r   rA   N).typingr   opentelemetry.metricsr   r   r   r   r   __annotations__r   r   r   r   r   r   r   r   r   r    r"   r$   r'   r(   r)   r*   r+   r,   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   r   r   r   r   <module>   s   				


						


				