Skip to content

Commit

Permalink
Merge pull request #12 from cnblogs/fix-event-publish
Browse files Browse the repository at this point in the history
fix: set event traceId
  • Loading branch information
ikesnowy authored Feb 6, 2023
2 parents aeed017 + 0988b8d commit cbd8093
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 cbd8093

Please sign in to comment.