How to unique identify each request in a ASP.NET Core 2 application (for logging)

ASP.NET Core also has HttpContext.TraceIdentifier which uniquely identifies the current request.

It is generated for each incoming request by Kestrel, so isn’t suitable for correlating calls to one service from another, but is suitable for correlating logs for a single request together, or to correlating an error message that might be displayed to the user with the corresponding logs.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)