-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opentelemetry: Add optional grpc.lb.locality to per-call metrics
The optional label API was added in 4c78a97 and xds_cluster_impl was plumbed in 077dcbf. From gRFC A78: > ### Optional xDS Locality Label > > When xDS is used, it is desirable for some metrics to include an optional > label indicating which xDS locality the metrics are associated with. > We want to provide this optional label for the metrics in both the > existing per-call metrics defined in [A66] and in the new metrics for > the WRR LB policy, described below. > > If locality information is available, the value of this label will be of > the form `{region="${REGION}", zone="${ZONE}", sub_zone="${SUB_ZONE}"}`, > where `${REGION}`, `${ZONE}`, and `${SUB_ZONE}` are replaced with the > actual values. If no locality information is available, the label will > be set to the empty string. > > #### Per-Call Metrics > > To support the locality label in the per-call metrics, we will provide > a mechanism for LB picker to add optional labels to the call attempt > tracer. We will then use this mechanism in the `xds_cluster_impl` > policy's picker to set the locality label. ... > > This label will be available on the following per-call metrics: > - `grpc.client.attempt.duration` > - `grpc.client.attempt.sent_total_compressed_message_size` > - `grpc.client.attempt.rcvd_total_compressed_message_size`
- Loading branch information
Showing
4 changed files
with
183 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters