-
Notifications
You must be signed in to change notification settings - Fork 53
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
fix: add back waku discv5 metrics #2927
Conversation
You can find the image built from this PR at
Built from 2b0b7a3 |
@@ -211,6 +211,8 @@ proc findRandomPeers*( | |||
elif wd.predicate.isSome(): | |||
discoveredRecords = discoveredRecords.filter(wd.predicate.get()) | |||
|
|||
waku_discv5_discovered.inc(discoveredRecords.len) |
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.
The only concern that I have is if we receive the same peer twice, we will update this metric both times.
Another alternative is increasing it in addPeer()
if the origin is PeerOrigin.Discv5
after passing the duplicate checks
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.
🤔 I thought we had another metric for that... I could add both.
This one say number of nodes discovered
so maybe we don't filter?
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.
Sounds good :) Thank you!
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, thanks so much!
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! Thanks for it 💯 !
I just added a minor suggestion
Co-authored-by: Ivan FB <[email protected]>
I noticed that waku discv5 metrics were not used so I added them back.