-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
EventSourceLogger does not propagate SpanId and TraceId #76718
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-extensions-logging Issue DetailsDescriptionAsp.net log scope data collected from an out of process collector such as dotnet-monitor no longer contains Activity information such as TraceId and SpanId. These properties are no longer added as part of the Request scope data (see dotnet/aspnetcore#22376). These properties are no added to loggers using IExternalScopeProvider/ISupportExternalScope, which EventSourceLogger does not support. Related dotnet-monitor issue dotnet/dotnet-monitor#2545 Reproduction StepsCreate a new asp.net core 6.0 web application. Expected behaviorLog from dotnet-monitor should contain SpanId and TraceId information Actual behaviorLog entry contains RequestId and RequestPath, but no activity information is displayed. Regression?Yes; this behavior worked in 3.1 Known WorkaroundsNo response ConfigurationWindows .Net 6 x64 The issue is specific to net 6+. Other informationNo response
|
@tarekgh @noahfalk @samsp-msft It may be a good idea to implement The reason is, users may not want scopes. In OTel we don't recommend scopes at all. Users who have enabled scopes have complained about the amount of data that appears because AspNetCore creates some scopes automatically. Why Also I think we might want to try and get this into .NET 9. We're working on solving out of process monitoring and correlation is very important to that scenario. |
Description
Asp.net log scope data collected from an out of process collector such as dotnet-monitor no longer contains Activity information such as TraceId and SpanId. These properties are no longer added as part of the Request scope data (see dotnet/aspnetcore#22376). These properties are no added to loggers using IExternalScopeProvider/ISupportExternalScope, which EventSourceLogger does not support.
Related dotnet-monitor issue dotnet/dotnet-monitor#2545
Reproduction Steps
Create a new asp.net core 6.0 web application.
Install dotnet-monitor tool
Run
dotnet-monitor collect --no-auth
Run
curl https://localhost:52323/logs?level=Information&pid=<pid of web app>
Issue a request to the web app.
Expected behavior
Log from dotnet-monitor should contain SpanId and TraceId information
Actual behavior
Log entry contains RequestId and RequestPath, but no activity information is displayed.
Regression?
Yes; this behavior worked in 3.1
Known Workarounds
No response
Configuration
Windows .Net 6 x64
The issue is specific to net 6+.
Other information
No response
The text was updated successfully, but these errors were encountered: