I am working on Asp.Net core with Azure service fabric. We have stateless service too. On the Azure portal we have 5 nodes and for each node we have 2 instances. I have implemented logging mechanism. I am using Dependency injection too.
Whenever worker role pick up the record from database,there are few values till the time that record is processed because I need to log those values in my logging framework. I am using this value to track telemetry across all systems.
Currently I have created an object for such values and assigning this object to logging class whenever I picked up the document.
It's working fine when I run in local environment because I have one node and one instance. Once I moved to Azure, it starts overwriting values.
How to avoid it? How can I make sure that value should not change till it gets processed?
For the Asp.Net we have session, do we have anything such like for worker role?
Thanks for your inputs and guidance.