From 34de5cf4832ffa43dec384ddb20c91ca0805954f Mon Sep 17 00:00:00 2001 From: Brad Town Date: Mon, 22 Apr 2024 13:23:08 -0700 Subject: [PATCH] stats/opencensus: Handle PickerUpdated to avoid "Received unexpected stats" error (#7153) --- stats/opencensus/stats.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stats/opencensus/stats.go b/stats/opencensus/stats.go index 01cd0b9b157d..017f39b37867 100644 --- a/stats/opencensus/stats.go +++ b/stats/opencensus/stats.go @@ -122,9 +122,9 @@ func recordRPCData(ctx context.Context, s stats.RPCStats, mi *metricsInfo) { return } switch st := s.(type) { - case *stats.InHeader, *stats.OutHeader, *stats.InTrailer, *stats.OutTrailer: - // Headers and Trailers are not relevant to the measures, as the - // measures concern number of messages and bytes for messages. This + case *stats.InHeader, *stats.OutHeader, *stats.InTrailer, *stats.OutTrailer, *stats.PickerUpdated: + // Headers, Trailers, and picker updates are not relevant to the measures, + // as the measures concern number of messages and bytes for messages. This // aligns with flow control. case *stats.Begin: recordDataBegin(ctx, mi, st)