-
Notifications
You must be signed in to change notification settings - Fork 446
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
feat: collect dial/listen metrics in webrtc and webtransport #2061
Conversation
Use the documented libp2p metrics system to collect metrics for the webrtc and webtransport transports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with question
wt.close(closeInfo) | ||
this.metrics?.dialerEvents.increment({ close: true }) | ||
wt.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whyd we get rid of closeInfo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use it as a cheap error object, but that's not what it does and it affects the WebTransport after closing.
From step 9 in the cleanup procedure:
If closeInfo is given, then set transport.[[State]] to "closed". Otherwise, set transport.[[State]] to "failed".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok makes sense, good to know
…2061) Use the documented libp2p metrics system to collect metrics for the webrtc and webtransport transports
Use the documented libp2p metrics system to collect metrics for the webrtc and webtransport transports