-
Notifications
You must be signed in to change notification settings - Fork 4.6k
stats/otel: Add grpc.lb.backend_service label to wrr metrics (A89) #8737
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
stats/otel: Add grpc.lb.backend_service label to wrr metrics (A89) #8737
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8737 +/- ##
==========================================
+ Coverage 83.22% 83.37% +0.15%
==========================================
Files 419 418 -1
Lines 32454 32377 -77
==========================================
- Hits 27009 26994 -15
+ Misses 4057 4017 -40
+ Partials 1388 1366 -22
🚀 New features to boost your workflow:
|
|
@mbissa FYI: @Pranjali-2501 |
We don't need it anymore. A75 already captures that in the gRFC itself. |
easwars
left a comment
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, modulo minor nits
|
|
||
| // SetBackendServiceOnState stores the backendService on the resolver state so | ||
| // that it can be used later as a label in wrr metrics. | ||
| func SetBackendServiceOnState(state resolver.State, backendService string) resolver.State { |
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.
Nit: Can we drop the OnState suffix on this one please. I checked a whole bunch of attribute setter functions and none of them have a suffix like this. Thanks.
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.
done.
| "time" | ||
|
|
||
| "google.golang.org/grpc/balancer" | ||
| wrr "google.golang.org/grpc/balancer/weightedroundrobin" |
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.
Please avoid this unnecessary import renaming. See: go/go-style/decisions#import-renaming
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.
done.
| return err | ||
| } | ||
|
|
||
| newState := wrr.SetBackendServiceOnState(s.ResolverState, b.clusterName) |
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.
Can we eliminate this local variable and inline it on line 303?
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.
done.
Address: https://github.com/grpc/proposal/blob/master/A89-backend-service-metric-label.md
This PR makes available the
backend_service(cluster name) label which is decided in clusterimpl (since we are pre-A75). It is added to WRR per-call metrics.RELEASE NOTES: