fix(mesh-phase5): telemetry service — graceful client-disconnect + null-safe required-string mapping

Claude-Session: https://claude.ai/code/session_01GASWkNEi68FSCtvr6rLoEW
This commit is contained in:
Joseph Doherty
2026-07-23 16:02:26 -04:00
parent 50f1620d79
commit 2e70ef88aa
3 changed files with 98 additions and 15 deletions
@@ -103,6 +103,15 @@ public sealed class TelemetryStreamGrpcService : GeneratedServiceBase
// Normal termination: the client disconnected (context token) or the max-lifetime cap
// fired (linked token). Neither is an error — swallow and let the stream close cleanly.
}
catch (Exception ex) when (ex is IOException or RpcException)
{
// Routine mid-stream disconnect: central's TelemetryStreamClient reconnects on ANY
// non-Cancelled error, so a broken pipe / connection-reset here is expected churn, not a
// fault. Swallow at Debug so grpc-dotnet doesn't log it at Error on every reconnect.
// (A genuinely unexpected exception still escapes to surface as an error.)
_log.LogDebug(
ex, "Telemetry client disconnected mid-stream (correlationId={CorrelationId})", correlationId);
}
_log.LogDebug("Telemetry stream closed (correlationId={CorrelationId})", correlationId);
}