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

Use CancelWithCause in swarm.dialPeer for better metrics reporting #2321

Closed
Tracked by #2481
sukunrt opened this issue Jun 2, 2023 · 2 comments · Fixed by #2532
Closed
Tracked by #2481

Use CancelWithCause in swarm.dialPeer for better metrics reporting #2321

sukunrt opened this issue Jun 2, 2023 · 2 comments · Fixed by #2532
Labels
kind/enhancement A net-new feature or improvement to an existing feature

Comments

@sukunrt
Copy link
Member

sukunrt commented Jun 2, 2023

By using https://pkg.go.dev/context#CancelCauseFunc in swarm.dialPeer we can detect if we cancelled because we received a connection while tracking metrics. This will help us understand if we are cancelling because we received a connection or because the caller cancelled the call for some reason.

Since this type is not available in go 1.19 we might have to wait till go1.21 to tackle this.

@sukunrt sukunrt added the kind/enhancement A net-new feature or improvement to an existing feature label Jun 2, 2023
@marten-seemann marten-seemann added the status/blocked Unable to be worked further until needs are met label Jun 2, 2023
@marten-seemann marten-seemann removed the status/blocked Unable to be worked further until needs are met label Aug 25, 2023
@marten-seemann
Copy link
Contributor

This is unblocked now, since we switched to Go 1.20. @sukunrt, should we get this into the v0.31 release?

@sukunrt
Copy link
Member Author

sukunrt commented Aug 27, 2023

Yeah, it'd be nice to get this in. Thanks for the reminder. I've raise a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants