Closed chniter closed 4 years ago
This is the API: https://docs.microsoft.com/en-us/dotnet/api/system.diagnostics.activity.id?view=netcore-3.1#System_Diagnostics_Activity_Id
But why isn't the same as HttpContext.TraceIdentifier ?
There are a couple of reasons:
HttpContext.TraceIdentifier
existed long before Activity didThat said, we should figure out how to stash the TraceIdentifier
on the activity.
Sounds like this issue has been answered.
Is your feature request related to a problem? Please describe.
I am trying to retrieve the traceId from server side that is attached on every HttpRequest. The Json response look like this:
{"type":"https://tools.ietf.org/html/rfc7235#section-3.1", "title":"Unauthorized", "status":401, "traceId":"|a08ab0a-4722acd640681cf6.1.1dfb8ec2_"}
Describe the solution you'd like
We can retrieve this value from: HttpContext.Request.Headers["Request-Id"] But why isn't the same as HttpContext.TraceIdentifier ?