Records error count metric directly. Accepts either a Connection or ClusterNode object.
(
self,
error: Exception,
connection: Union[Connection, "ClusterNode"],
is_internal: bool = True,
retry_attempts: Optional[int] = None,
)
| 904 | return nodes |
| 905 | |
| 906 | async def _record_error_metric( |
| 907 | self, |
| 908 | error: Exception, |
| 909 | connection: Union[Connection, "ClusterNode"], |
| 910 | is_internal: bool = True, |
| 911 | retry_attempts: Optional[int] = None, |
| 912 | ): |
| 913 | """ |
| 914 | Records error count metric directly. |
| 915 | Accepts either a Connection or ClusterNode object. |
| 916 | """ |
| 917 | await record_error_count( |
| 918 | server_address=connection.host, |
| 919 | server_port=connection.port, |
| 920 | network_peer_address=connection.host, |
| 921 | network_peer_port=connection.port, |
| 922 | error_type=error, |
| 923 | retry_attempts=retry_attempts if retry_attempts is not None else 0, |
| 924 | is_internal=is_internal, |
| 925 | ) |
| 926 | |
| 927 | async def _record_command_metric( |
| 928 | self, |
no test coverage detected