Skip to content

Commit 052b9c8

Browse files
authored
Added logging line after the gRPC stream has been established without error with the sidecar from the workflow SDK (#1688)
Signed-off-by: Whit Waldo <[email protected]>
1 parent 0de6cd9 commit 052b9c8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Dapr.Workflow/Logging.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ internal static partial class Logging
8888
[LoggerMessage(LogLevel.Information, "Starting gRPC bidirectional stream with Dapr sidecar")]
8989
public static partial void LogGrpcProtocolHandlerStartStream(this ILogger logger);
9090

91+
[LoggerMessage(LogLevel.Information, "Established gRPC bidirectional stream with Dapr sidecar")]
92+
public static partial void LogGrpcProtocolHandlerStreamEstablished(this ILogger logger);
93+
9194
[LoggerMessage(LogLevel.Information, "gRPC stream canceled")]
9295
public static partial void LogGrpcProtocolHandlerStreamCanceled(this ILogger logger);
9396

src/Dapr.Workflow/Worker/Grpc/GrpcProtocolHandler.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@ public async Task StartAsync(
6868
// Establish the server streaming call
6969
_streamingCall = _grpcClient.GetWorkItems(request, cancellationToken: token);
7070

71+
_logger.LogGrpcProtocolHandlerStreamEstablished();
72+
7173
// Process work items from the stream
7274
await ReceiveLoopAsync(_streamingCall.ResponseStream, workflowHandler, activityHandler, token);
7375

74-
// Stream ended gracefully => tradfe as an interrupted and reconnect unless shutting down
76+
// Stream ended gracefully => treat as an interrupted and reconnect unless shutting down
7577
if (!token.IsCancellationRequested)
7678
{
7779
await DelayOrStopAsync(ReconnectDelay, token);

0 commit comments

Comments
 (0)