From 0988b8d80dcb2318b8d6476f44568ba3bce0c4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E6=98=9F=E7=B9=81?= Date: Mon, 6 Feb 2023 14:45:45 +0800 Subject: [PATCH] fix: set event traceId --- src/Cnblogs.Architecture.Ddd.EventBus.Dapr/DaprEventBus.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cnblogs.Architecture.Ddd.EventBus.Dapr/DaprEventBus.cs b/src/Cnblogs.Architecture.Ddd.EventBus.Dapr/DaprEventBus.cs index 952aca5..a107de6 100644 --- a/src/Cnblogs.Architecture.Ddd.EventBus.Dapr/DaprEventBus.cs +++ b/src/Cnblogs.Architecture.Ddd.EventBus.Dapr/DaprEventBus.cs @@ -51,11 +51,11 @@ public async Task PublishAsync(string eventName, TEvent @event) eventName, @event, @event.TraceId ?? @event.Id); - var eventToSend = @event.TraceId = TraceId; + @event.TraceId = TraceId; await _daprClient.PublishEventAsync( DaprOptions.PubSubName, DaprUtils.GetDaprTopicName(_daprOptions.AppName, eventName), - eventToSend); + @event); } ///