MCPcopy
hub / github.com/redis/redis-py / _record_error_metric

Method _record_error_metric

redis/asyncio/cluster.py:906–925  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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,

Callers 2

execute_commandMethod · 0.95
_execute_commandMethod · 0.95

Calls 1

record_error_countFunction · 0.90

Tested by

no test coverage detected