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

chore: add basic metrics for rendezvous #905

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

vpavlin
Copy link
Member

@vpavlin vpavlin commented Jun 6, 2023

Since we have enabled Rendezvous Discovery in nwaku by default (as long as relay is enabled), we need to be able to measure some basic usage.

This is my attempt to add basic set of metrics:

libp2p_rendezvous_register - counter for register/advertise requests
libp2p_rendezvous_discover - counter for discover/request requests
libp2p_rendezvous_registered - gauge representing number of currently registered peers
libp2p_rendezvous_namespaces - gauge representing number of currently known namespaces

I am not sure if my approach to setting these metrics is optimal, so would love any suggestions for improvements

@vpavlin vpavlin requested review from lchenut and Menduist June 6, 2023 09:40
@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #905 (583b89d) into unstable (c76d1e1) will increase coverage by 0.03%.
The diff coverage is 83.33%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           unstable     #905      +/-   ##
============================================
+ Coverage     84.27%   84.30%   +0.03%     
============================================
  Files            91       91              
  Lines         15012    15017       +5     
============================================
+ Hits          12651    12660       +9     
+ Misses         2361     2357       -4     
Impacted Files Coverage Δ
libp2p/protocols/rendezvous.nim 91.37% <83.33%> (+0.07%) ⬆️

... and 5 files with indirect coverage changes

@vpavlin vpavlin merged commit 3725f6a into unstable Jun 7, 2023
@vpavlin vpavlin deleted the chore/add-rendezvous-metrics branch June 7, 2023 13:45
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