-
Notifications
You must be signed in to change notification settings - Fork 510
Closed
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upexplorationkind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing featureneed/analysisNeeds further analysis before proceedingNeeds further analysis before proceeding
Description
The libp2p object returned from createLibp2p is an EventTarget that emits a few different events.
These events are really useful for observing the inner workings of libp2p without having to tie your code to the internal structure of libp2p.
They also open the door to real-time monitoring of libp2p with better observability and debugging possibilities.
The event list should be expanded to encompass more events. Some (non-exhausive) suggestions:
peer:dial- when we dial a peer, the event should hold the peer id and which multiaddrs are being dialledpeer:dial:success- the event should hold the peer id and the multiaddr that succeededpeer:dial:error- the event should hold the peer id and the multiaddr that failed and anErrorobjectidentify:success- the identify protocol competed for a peer - the event should hold the peer ididentify:error- the identify protocol failed for a peer - the event should hold the peer id and anErrorobjectidentify:push:success- the identify push protocol competed for a peer - the event should hold the peer ididentify:push:error- the identify push protocol failed for a peer - the event should hold the peer id and anErrorobjectconnection:prune- we pruned a connection, the event should have the peer id of the connection that was closedconnection:upgrade- a connection was upgraded, the event should have the connection that was upgraded- ...other things?
It would be good to establish a naming convention for events, the above hasn't had a whole lot of thought applied to it.
maschad and wemeetagain
Metadata
Metadata
Assignees
Labels
P2Medium: Good to have, but can wait until someone steps upMedium: Good to have, but can wait until someone steps upexplorationkind/enhancementA net-new feature or improvement to an existing featureA net-new feature or improvement to an existing featureneed/analysisNeeds further analysis before proceedingNeeds further analysis before proceeding
Type
Projects
Status
🎉Done