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

feat: collect dial/listen metrics in webrtc and webtransport #2061

Merged
merged 4 commits into from
Sep 20, 2023

Conversation

achingbrain
Copy link
Member

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
@achingbrain achingbrain requested a review from a team as a code owner September 19, 2023 10:52
Copy link
Member

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

LGTM with question

Comment on lines 96 to 114
wt.close(closeInfo)
this.metrics?.dialerEvents.increment({ close: true })
wt.close()
Copy link
Member

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

Copy link
Member Author

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".

Copy link
Member

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

@achingbrain achingbrain merged commit 6cb80f7 into master Sep 20, 2023
17 checks passed
@achingbrain achingbrain deleted the feat/add-metrics-to-webtransports branch September 20, 2023 10:49
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Sep 27, 2023
…2061)

Use the documented libp2p metrics system to collect metrics for the
webrtc and webtransport transports
This was referenced Jan 18, 2024
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