o
    pi0                     @   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-dQZ.eedR< 	 dedefdSdTZ/dUZ0eedV< 	 dedefdWdXZ1dYZ2eedZ< 	 dedefd[d\Z3d]S )^    )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` attributezYThe number of connections that are currently in state described by the `state` attribute.{connection}namedescriptionunit)create_up_down_counterr   r    r   h/home/ubuntu/.local/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 connectionz,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 allowedz4The maximum number of idle open connections allowed.r   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 allowedz4The minimum number of idle open connections allowed.r   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 allowedz/The maximum number of open connections allowed.r   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
   )z=The number of current pending requests for an open connectionz>The number of current pending requests for an open connection.	{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 poolzaThe 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 poolzEThe time between borrowing a connection and returning it to the pool.r   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 poolz<The time it took to obtain an open connection from the pool.r   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   r
   )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   r/   r   r   r   r   %create_db_client_connections_idle_max   r   r0   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   r1   r   r   r   r   %create_db_client_connections_idle_min   r   r2   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   r3   r   r   r   r    create_db_client_connections_max   r   r4   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   r5   r   r   r   r   -create_db_client_connections_pending_requests   r#   r6   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&   r7   r   r   r   r   %create_db_client_connections_timeouts  r   r8   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   r9   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.cosmosdb.active_instance.count(DB_CLIENT_COSMOSDB_ACTIVE_INSTANCE_COUNTc                 C   r
   )zEDeprecated, use `azure.cosmosdb.client.active_instance.count` insteadzFDeprecated, use `azure.cosmosdb.client.active_instance.count` instead.z
{instance}r   )r   r?   r   r   r   r   /create_db_client_cosmosdb_active_instance_countD  r#   r@   z+db.client.cosmosdb.operation.request_charge+DB_CLIENT_COSMOSDB_OPERATION_REQUEST_CHARGEc                 C   r
   )zHDeprecated, use `azure.cosmosdb.client.operation.request_charge` insteadzIDeprecated, use `azure.cosmosdb.client.operation.request_charge` instead.z{request_unit}r   )r   rA   r   r   r   r   2create_db_client_cosmosdb_operation_request_chargeW  r#   rB   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   rC   r   r   r   r   #create_db_client_operation_durationh  r   rD   z db.client.response.returned_rows DB_CLIENT_RESPONSE_RETURNED_ROWSc                 C   r
   )z?The actual number of records returned by the database operationz@The actual number of records returned by the database operation.z{row}r   )r   rE   r   r   r   r   'create_db_client_response_returned_rowsy  r   rF   N)4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.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   r   r   r   r   <module>   s   				

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

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

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