What Id can I use when correlating changes across entities.
See original GitHub issueI am trying to gather up all audit rows that happened as a result of the same request. I am not using transactions at the moment, but my DbContext is a scoped dependency so I can I rely on ConnectionId
?
Or, should I be passing a custom CorrelationId down all my layers every time?
Should I maybe add transactions to all my requests so I have the TransactionId? Or will that cause me great pain when it comes to scoped transactions/distributed transactions?
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Configure correlation logic with decisions
The basic decision builder covers the majority of use cases and focuses on "correlate by attribute," where you can specify filter conditions for...
Read more >Panel Data Analysis Fixed and Random Effects using Stata
Once the data is set as panel, you can use a series of xt commands to analyze it. ... Variables that do not...
Read more >What is identity lifecycle management? - Azure
A digital identity is information on an entity used by one or more computing resources, such as operating systems or applications.
Read more >Auditing Standard No. 5
Introduction. 1. This standard establishes requirements and provides direction that applies when an auditor is engaged to perform an audit of management's ...
Read more >FinCEN_Guidance_CDD_FAQ_...
What process should a covered financial institution use to identify and verify the identity of a beneficial owner of a legal entity customer ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks good to me.
If you are in a ASP.NET Core Web API, you could use the HttpContext.TraceIdentifier value (a unique value per request). So you can add this correlation ID to the events via a Custom Action.
But I would recommend to also activate the audit logging for the controller actions(s) with Audit.WebApi library. It will generate audit events for each call to your API, including the TraceIdentifier.
Take a look at the web api template provided. You can install the template with:
dotnet new -i Audit.WebApi.Template
And then you can generate a project that uses both Audit.WebApi and Audit.EntityFramework both including the correlation:
dotnet new webapiaudit -E
for further discussion we can better use the gitter chat channel: https://gitter.im/Audit-NET/Lobby