| 3339 | pass |
| 3340 | |
| 3341 | def get_connection_count(self) -> List[tuple[int, dict]]: |
| 3342 | from redis.observability.attributes import get_pool_name |
| 3343 | |
| 3344 | attributes = AttributeBuilder.build_base_attributes() |
| 3345 | attributes[DB_CLIENT_CONNECTION_POOL_NAME] = get_pool_name(self) |
| 3346 | free_connections_attributes = attributes.copy() |
| 3347 | in_use_connections_attributes = attributes.copy() |
| 3348 | |
| 3349 | free_connections_attributes[DB_CLIENT_CONNECTION_STATE] = ( |
| 3350 | ConnectionState.IDLE.value |
| 3351 | ) |
| 3352 | in_use_connections_attributes[DB_CLIENT_CONNECTION_STATE] = ( |
| 3353 | ConnectionState.USED.value |
| 3354 | ) |
| 3355 | |
| 3356 | return [ |
| 3357 | (len(self._get_free_connections()), free_connections_attributes), |
| 3358 | (len(self._get_in_use_connections()), in_use_connections_attributes), |
| 3359 | ] |
| 3360 | |
| 3361 | |
| 3362 | class BlockingConnectionPool(ConnectionPool): |