Skip to content

Commit

Permalink
fix: set event traceId
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesnowy committed Feb 6, 2023
1 parent aeed017 commit 0988b8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cnblogs.Architecture.Ddd.EventBus.Dapr/DaprEventBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ public async Task PublishAsync<TEvent>(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);
}

/// <inheritdoc />
Expand Down

0 comments on commit 0988b8d

Please sign in to comment.