Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protocols/identify: Extend log message on second identify push #2726

Merged
merged 1 commit into from
Jun 26, 2022

Conversation

mxinden
Copy link
Member

@mxinden mxinden commented Jun 24, 2022

Description

Print remote peer ID when seeing a second identify push stream coming in.

Most of the changes are needed to make IdentifyHandler aware of the peer ID of its remote.

Links to any relevant issues

Open Questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Print remote peer ID when seeing a second identify push stream coming in.
@mxinden
Copy link
Member Author

mxinden commented Jun 24, 2022

//CC @BigLep this is the last pull request, making sure log messages on exceeding limits are useful.

@@ -120,8 +149,9 @@ impl ConnectionHandler for IdentifyHandler {
EitherOutput::Second(fut) => {
if self.inbound_identify_push.replace(fut).is_some() {
warn!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated: We might want to upgrade to tracing at some point so we can emit these values in a structured way.

Or we wait until log has a structured key-value support.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for structured logging, though not something I will focus on any time soon. Don't have an opinion on crates providing structured logging.

@mxinden mxinden merged commit 2c70c59 into libp2p:master Jun 26, 2022
Copy link
Contributor

@BigLep BigLep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mxinden . Looks good from a messaging regard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants