-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activity id of nettrace events are always 0 #102411
Comments
Tagging subscribers to this area: @tarekgh, @tommcdon, @pjanotti |
This probably could be documented a little more clearly, but ActivityIDs are off by default so the behavior you see appears to be by design. If you want to turn them on you need to add provider System.Threading.Tasks.TplEventSource with keyword 0x80 (TasksFlowActivityIds). Check out the sample at https://learn.microsoft.com/en-us/dotnet/core/diagnostics/eventsource-activity-ids#tracking-work-using-an-activity-id. |
I didn't know about that thanks! I was able to get the activity ids using
|
Description
I noticed in all the nettrace collected from prod, all the ActivityId are RelatedActivityId are 0. One of the consequence is that the RequestStart/Stop events from ASP.NET Core can't be correlated.
Reproduction Steps
dotnet trace collect --process-id $PID --providers Microsoft-AspNetCore-Server-Kestrel --clreventlevel verbose
Expected behavior
I would expect to have non-0 ActivityId to correlate requests.
Actual behavior
All ActivityIds are 0.
Configuration
.NET: 8.0.105
OS: Windows
Arch: x64
The text was updated successfully, but these errors were encountered: