C#C
C#2y ago
Esa

HttpContext and TraceIdentifier

Anybody familiar with how the TraceId of HttpContext works?
I am aware it represents a {TraceIdentifier}:{Span} format with the former being the overall identifier of an Activity and the latter being a specific sub-operation performed in the context of that activity. But I don't understand when one activity starts and another one stops.

I tried performing multiple repeat API requests through swagger, and they all got the same TraceIdentifier but incrementing Spans.

Can anyone clarify what is happening? I have a common .net 8.0 setup of program.cs for a WebAPI solution.
Was this page helpful?