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

p2p: Telemetry and metrics improvements #6104

Closed

Conversation

algorandskiy
Copy link
Contributor

@algorandskiy algorandskiy commented Aug 16, 2024

Summary

  1. Added EnableP2P and EnableP2PHybridMode to the telemetry Startup event. This will allow to see fractions of WS, P2P and Hybrid nodes.
  2. Added pubsubTracer.SendRPC implementation to track TX messages being broadcasted over the network. These will be the same as algod_network_sent_bytes_TX and algod_network_message_sent_TX.

This is part 1 of a bigger change to separate metrics like algod_network_sent_bytes_{TAG} for ws and p2p networks. The newly added algod_transaction_messages_p2p_sent will be replaced by algod_network_message_sent_TX but this requires moving all of these into the util/metrics to be used in both network package and network/p2p sub-packages. This would also allow to write a simple unit test for gossipsub metric (having the counter available in the node or network package).

Test Plan

Tested locally with goal network + pingpong + test/heapwatch/heapWatch.py --period 10 --metrics

@algorandskiy algorandskiy added Enhancement p2p Work related to the p2p project labels Aug 16, 2024
@algorandskiy algorandskiy self-assigned this Aug 16, 2024
Copy link

codecov bot commented Aug 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 56.21%. Comparing base (8e2e2e4) to head (02b5eeb).

Files Patch % Lines
network/p2p/pubsubTracer.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6104      +/-   ##
==========================================
- Coverage   56.22%   56.21%   -0.02%     
==========================================
  Files         490      490              
  Lines       69705    69710       +5     
==========================================
- Hits        39191    39186       -5     
- Misses      27840    27851      +11     
+ Partials     2674     2673       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@algorandskiy algorandskiy marked this pull request as draft August 19, 2024 16:40
@algorandskiy
Copy link
Contributor Author

Fixed SendRPC checks

@algorandskiy algorandskiy marked this pull request as ready for review August 19, 2024 17:12
gmalouf
gmalouf previously approved these changes Aug 19, 2024
cmd/algod/main.go Show resolved Hide resolved
network/p2p/pubsubTracer.go Outdated Show resolved Hide resolved
Copy link
Contributor

@cce cce left a comment

Choose a reason for hiding this comment

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

other than Publish[i] LGTM

@algorandskiy
Copy link
Contributor Author

Closing, #6105 has all of it and much more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement p2p Work related to the p2p project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants