-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add metrics to snet #3257
Add metrics to snet #3257
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.
Reviewed 6 of 6 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @scrye)
go/lib/snet/dispatcher.go, line 103 at r1 (raw file):
hdr, ok := pkt.L4Header.(*scmp.Hdr) if !ok { metrics.M.SCMPErrors().Inc()
Hm I wonder if that's what kormat meant with SCMP errors? I thought maybe more something along the lines of SCMP errors received.
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.
Reviewable status: 5 of 6 files reviewed, 1 unresolved discussion (waiting on @lukedirtwalker)
go/lib/snet/dispatcher.go, line 103 at r1 (raw file):
Previously, lukedirtwalker (Lukas Vogel) wrote…
Hm I wonder if that's what kormat meant with SCMP errors? I thought maybe more something along the lines of SCMP errors received.
My approach was:
- if no handler, consider the "unhandled SCMP" as an error;
- handlers are free to then collect metrics for which SCMP parts they think are relevant;
I've changed the behavior in the PR a little bit right now:
- calling the SCMP handler with a non-SCMP message is no longer considered an error;
- if no handler found, assume the SCMP is an error (same as before), because it might very well be one;
- the default handler increases the errors counter appropriately now;
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.
Reviewed 1 of 1 files at r2.
Reviewable status: complete! all files reviewed, all discussions resolved
Fixes #3107
Adds the following metrics:
This change is