diff --git a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc index d9f02b41bf7..cdc78e0523a 100644 --- a/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +++ b/src/core/ext/filters/backend_metrics/backend_metric_filter.cc @@ -129,6 +129,7 @@ BackendMetricFilter::Create(const ChannelArgs&, ChannelFilter::Args) { } void BackendMetricFilter::Call::OnServerTrailingMetadata(ServerMetadata& md) { + if (md.get(GrpcCallWasCancelled()).value_or(false)) return; auto* ctx = &GetContext< grpc_call_context_element>()[GRPC_CONTEXT_BACKEND_METRIC_PROVIDER]; if (ctx == nullptr) {