arcus-azure/arcus.messaging

Assign message correlation information from model, not accessor

stijnmoreels opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
Currently, we're taking a detour when assigning the message correlation from the message router to the Serilog LogContext. First the correlation accessor is assigned, which gets retrieved back when the logs are written. This caused a problem as the request tracking seems to late in the chain and misses out on the correlation assignment.

Describe the solution you'd like
Use the passed along correlation model in the message router to directly assign it in the Serilog LogContext. We can still use the MessageCorrelationInfoEnricher but it should take in the correlation model instead of the accessor.