Record error count. Args: server_address: Server address server_port: Server port network_peer_address: Network peer address network_peer_port: Network peer port error_type: Error type (Exception) retry_attempts: Retry attempts is_int
(
server_address: str,
server_port: int,
network_peer_address: str,
network_peer_port: int,
error_type: Exception,
retry_attempts: int,
is_internal: bool = True,
)
| 379 | |
| 380 | |
| 381 | async def record_error_count( |
| 382 | server_address: str, |
| 383 | server_port: int, |
| 384 | network_peer_address: str, |
| 385 | network_peer_port: int, |
| 386 | error_type: Exception, |
| 387 | retry_attempts: int, |
| 388 | is_internal: bool = True, |
| 389 | ) -> None: |
| 390 | """ |
| 391 | Record error count. |
| 392 | |
| 393 | Args: |
| 394 | server_address: Server address |
| 395 | server_port: Server port |
| 396 | network_peer_address: Network peer address |
| 397 | network_peer_port: Network peer port |
| 398 | error_type: Error type (Exception) |
| 399 | retry_attempts: Retry attempts |
| 400 | is_internal: Whether the error is internal (e.g., timeout, network error) |
| 401 | """ |
| 402 | collector = _get_or_create_collector() |
| 403 | if collector is None: |
| 404 | return |
| 405 | |
| 406 | try: |
| 407 | collector.record_error_count( |
| 408 | server_address=server_address, |
| 409 | server_port=server_port, |
| 410 | network_peer_address=network_peer_address, |
| 411 | network_peer_port=network_peer_port, |
| 412 | error_type=error_type, |
| 413 | retry_attempts=retry_attempts, |
| 414 | is_internal=is_internal, |
| 415 | ) |
| 416 | except Exception: |
| 417 | pass |
| 418 | |
| 419 | |
| 420 | async def record_pubsub_message( |
no test coverage detected