p2p: move metrics closer to the measured action
What
Counting the number of message sent was done from P2p instead of P2p_conn module because when using P2p_metrics in P2p_conn, there was a cyclic dependency.
!8809 (merged) split P2p_metrics and reduced module dependencies.
Then, now it is possible to move these metrics to a better place, that may prevent to forget to count sent messages in future modifications.
Why
How
Manually testing the MR
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR