@@ -430,31 +430,33 @@ private void updateWeight() {
430430 for (int i = 0 ; i < children .size (); i ++) {
431431 double newWeight = ((WeightedChildLbState ) children .get (i )).getWeight (staleEndpoints ,
432432 notYetUsableEndpoints );
433- // TODO: add target and locality labels once available
433+ // TODO: add locality label once available
434434 helper .getMetricRecorder ()
435- .recordDoubleHistogram (ENDPOINT_WEIGHTS_HISTOGRAM , newWeight , ImmutableList .of ("" ),
435+ .recordDoubleHistogram (ENDPOINT_WEIGHTS_HISTOGRAM , newWeight ,
436+ ImmutableList .of (helper .getChannelTarget ()),
436437 ImmutableList .of ("" ));
437438 newWeights [i ] = newWeight > 0 ? (float ) newWeight : 0.0f ;
438439 }
439440 if (staleEndpoints .get () > 0 ) {
440- // TODO: add target and locality labels once available
441+ // TODO: add locality label once available
441442 helper .getMetricRecorder ()
442443 .addLongCounter (ENDPOINT_WEIGHT_STALE_COUNTER , staleEndpoints .get (),
443- ImmutableList .of ("" ),
444+ ImmutableList .of (helper . getChannelTarget () ),
444445 ImmutableList .of ("" ));
445446 }
446447 if (notYetUsableEndpoints .get () > 0 ) {
447- // TODO: add target and locality labels once available
448+ // TODO: add locality label once available
448449 helper .getMetricRecorder ()
449450 .addLongCounter (ENDPOINT_WEIGHT_NOT_YET_USEABLE_COUNTER , notYetUsableEndpoints .get (),
450- ImmutableList .of ("" ), ImmutableList .of ("" ));
451+ ImmutableList .of (helper . getChannelTarget () ), ImmutableList .of ("" ));
451452 }
452453
453454 this .scheduler = new StaticStrideScheduler (newWeights , sequence );
454455 if (this .scheduler .usesRoundRobin ()) {
455- // TODO: add target and locality labels once available
456+ // TODO: locality label once available
456457 helper .getMetricRecorder ()
457- .addLongCounter (RR_FALLBACK_COUNTER , 1 , ImmutableList .of ("" ), ImmutableList .of ("" ));
458+ .addLongCounter (RR_FALLBACK_COUNTER , 1 , ImmutableList .of (helper .getChannelTarget ()),
459+ ImmutableList .of ("" ));
458460 }
459461 }
460462
0 commit comments