Skip to content

Commit fc86084

Browse files
committed
xds: Rename grpc.xds.cluster to grpc.lb.backend_service
The name is being changed to allow the value to be used in more metrics where xds-specifics are awkward.
1 parent a0a42fc commit fc86084

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

xds/src/main/java/io/grpc/xds/ClusterImplLoadBalancer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ private RequestLimitingSubchannelPicker(SubchannelPicker delegate,
385385
public PickResult pickSubchannel(PickSubchannelArgs args) {
386386
args.getCallOptions().getOption(ClusterImplLoadBalancerProvider.FILTER_METADATA_CONSUMER)
387387
.accept(filterMetadata);
388-
args.getPickDetailsConsumer().addOptionalLabel("grpc.xds.cluster", cluster);
388+
args.getPickDetailsConsumer().addOptionalLabel("grpc.lb.backend_service", cluster);
389389
for (DropOverload dropOverload : dropPolicies) {
390390
int rand = random.nextInt(1_000_000);
391391
if (rand < dropOverload.dropsPerMillion()) {

xds/src/test/java/io/grpc/xds/ClusterImplLoadBalancerTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public void pick_addsOptionalLabels() {
298298
// The value will be determined by the parent policy, so can be different than the value used in
299299
// makeAddress() for the test.
300300
verify(detailsConsumer).addOptionalLabel("grpc.lb.locality", locality.toString());
301-
verify(detailsConsumer).addOptionalLabel("grpc.xds.cluster", CLUSTER);
301+
verify(detailsConsumer).addOptionalLabel("grpc.lb.backend_service", CLUSTER);
302302
}
303303

304304
@Test
@@ -322,7 +322,7 @@ public void pick_noResult_addsClusterLabel() {
322322
TestMethodDescriptors.voidMethod(), new Metadata(), CallOptions.DEFAULT, detailsConsumer);
323323
PickResult result = currentPicker.pickSubchannel(pickSubchannelArgs);
324324
assertThat(result.getStatus().isOk()).isTrue();
325-
verify(detailsConsumer).addOptionalLabel("grpc.xds.cluster", CLUSTER);
325+
verify(detailsConsumer).addOptionalLabel("grpc.lb.backend_service", CLUSTER);
326326
}
327327

328328
@Test

0 commit comments

Comments
 (0)