-
Notifications
You must be signed in to change notification settings - Fork 16
feat: export metrics #71
feat: export metrics #71
Conversation
@achingbrain David DiMaria pointed out to me that we already have this : https://github.com/libp2p/js-libp2p-interfaces/blob/master/packages/interface-mocks/src/metrics.ts . I believe sinon-ts was suggested in another comment but using the existing mock would definitely work. Do you have a preference? |
They are intended to fulfil different roles - the classes in Previously we had complicated dependency trees where libp2p components would depend on each other to test functionality which made releasing changes across multiple modules difficult, the collection of mocks was intended to alleviate some of that. You'd use |
@achingbrain This PR collects dialer events. I know we'll need to add listener ones when b2b is completed. Can you think of other relevant events to include? ( |
@achingbrain : I want to get this one out of limbo. Can you please give any input? |
@achingbrain @lightsofapollo What are the next steps to get this landed? |
@lightsofapollo it looks like there are conflicts that need to be resolved, and an issue with CI. I have an outstanding question to @achingbrain, though maybe @MarcoPolo can answer it? |
I'll bring this up for discussion during the js-libp2p triage to determine next steps |
@p-shahi were you able to determine the next steps? |
Yes, @wemeetagain is assigned for review, so waiting on that. |
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
28c9183
to
29a9269
Compare
It seems the failing test has been resolved on the Browser-to-server PR , regardless there will be merge conflicts so let's wait till that is merged first given that's of a higher priority. |
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.
Looks like these are the events that are tracked:
incoming_stream
stream_end
close
openError
unknownError
- Consider using either camel case OR underscore case.
- Consider tracking a new outgoing stream
- Consider tracking opening a peer connection
Recommendation of additional metrics by @wemeetagain
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, just a few small nits
#150 has the necessary fixes to stop CI from failing, let's merge that first. |
## [1.2.0](v1.1.11...v1.2.0) (2023-05-09) ### Features * export metrics ([#71](#71)) ([b3cb445](b3cb445))
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adds metrics for common error cases (timeoout, dtls handshake failure) and few success cases (stream open / stream close)
Closes: #64