-
Notifications
You must be signed in to change notification settings - Fork 431
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
Features/unified p2p message metrics #6835
Conversation
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.
Cool idea, but I really don't like translating those dictionaries all the time.
I think better idea would be to create struct Protocol
with protocol name and version and maybe even struct Message
with Protocol+MessageName.
We could avoid allocations, while writing to Metrics dictionary in the first place and then later have the conversion on ToString
method, which would be cached of course.
Question: We could use similar generic metrics for JSON RPC?
What kind of struct and what is it used for? |
As requested, metrics for all p2p messages.
Automatically have metrics for all p2p message type, incoming and outgoing, count and bytes. Dashboard would look like this:
Uses four metric with two label each. Example
rate(nethermind_incoming_p2p_messages{protocol="snap1",message="GetAccountRange"}[$__rate_interval])
Like any other labeled metric, can sum them by protocol or message.
Actually, should
message
bemessage_type
? ortype
? No sure. Let me know if anyone have any preference.Deprecate a bunch of metrics that is now redundant.
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Documentation
Requires documentation update
Requires explanation in Release Notes