Skip to content

Added Correlation and CausationId support in samples

Compare
Choose a tag to compare
@oskardudycz oskardudycz released this 05 Mar 17:58
· 444 commits to main since this release

Implemented correlation id and causation id for tracing operations fully.

Refactored previously existing CorrelationIdMiddleware by adding causation id handling and renamed it to more general TracingMiddleware. It takes correlation id and causation id from HTTP headers and caches them into TracingScope.

TracingScope is also setting logging scope internally to keep Correlation id and causation id in logs. Thanks to that, the logic for tracing setup can be reused in middleware and subscriptions. The new causation id is generated based on the event id in subscriptions. Thanks to that, we can build the tree with a history of event handling.

Updated Optimistic Concurrency Scopes and generalised into AppendScope. It wraps both tracing and expected version handling. Pushed tracing metadata into Marten and EventStoreDB storage.

Replaced custom EventBus instead of Mediator one to have more flexibility (e.g. be able to create new DI and logging scopes).

See more in PRs: #106 and #108.