Skip to content

Commit

Permalink
Include validator address in gRPC status log. (#3313)
Browse files Browse the repository at this point in the history
This is a port of #3312.

## Motivation

The gRPC status log currently does not show which validator connection
it is about.

## Proposal

Include the validator address in the log.

## Test Plan

CI

## Release Plan

- Nothing to do.

## Links

- Related to #3300
- Testnet Archimedes version: #3312
- [reviewer
checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
  • Loading branch information
afck authored Feb 12, 2025
1 parent 228d8a3 commit 6fc86ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions linera-rpc/src/grpc/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ impl ValidatorNode for GrpcClient {
})
.flatten();

let span = tracing::info_span!("notification stream");
// The stream of `Notification`s that inserts increasing delays after retriable errors, and
// terminates after unexpected or fatal errors.
let notification_stream = endlessly_retrying_notification_stream
Expand All @@ -330,9 +331,11 @@ impl ValidatorNode for GrpcClient {
retry_count = 0;
return future::Either::Left(future::ready(true));
};
let _enter_span = span.enter();
if !Self::is_retryable(status) || retry_count >= max_retries {
return future::Either::Left(future::ready(false));
}
drop(_enter_span);
let delay = retry_delay.saturating_mul(retry_count);
retry_count += 1;
future::Either::Right(async move {
Expand Down

1 comment on commit 6fc86ee

@tohid0943

This comment was marked as spam.

Please sign in to comment.