-
Notifications
You must be signed in to change notification settings - Fork 120
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Description
Logs from dotnet-monitor don't incude TraceId and SpanId scopes.
Configuration:
- .NET 6 razor app + dotnet-monitor 6.2.2 both run in docker (Linux)
- or .NET 6 webapi + dotnet-monitor 6.2.2 windows
- logging configuration:
builder.Logging.Configure(options =>
{
options.ActivityTrackingOptions = ActivityTrackingOptions.TraceId | ActivityTrackingOptions.SpanId | ActivityTrackingOptions.ParentId;
});
"Console" : {
"IncludeScopes" : true
}
What I see in console:
info: System.Net.Http.HttpClient.storage.LogicalHandler[101]
=> SpanId:2eab45dce8666ecc, TraceId:2287adaf1b71318a94a722124e6495ab, ParentId:0000000000000000 => ConnectionId:0HMKUE1V6VF2N => RequestPath:/Meme RequestId:0HMKUE1V6VF2N:000000B0 => /Meme => HTTP GET http://storage:5050/memes/meme
End processing HTTP request after 0.7847ms - 200
what I get from dotnet-monitor via POST /logs?pid=1 { "filterSpecs": { "System.Net.Http.HttpClient": "Information" }, "useAppFilters": false }
{
"Timestamp": "2022-09-24 21:23:12Z",
"LogLevel": "Information",
"EventId": 101,
"EventName": "RequestPipelineEnd",
"Category": "System.Net.Http.HttpClient.storage.LogicalHandler",
"Message": "End processing HTTP request after 0.7847ms - 200",
"State": {
"Message": "End processing HTTP request after 0.7847ms - 200",
"ElapsedMilliseconds": "0.7847",
"StatusCode": "200",
"{OriginalFormat}": "End processing HTTP request after {ElapsedMilliseconds}ms - {StatusCode}"
},
"Scopes": [
{
"HttpMethod": "GET",
"Uri": "http://storage:5050/memes/meme",
"{OriginalFormat}": "HTTP {HttpMethod} {Uri}"
}
]
}
Configuration
- What OS and version, and what distro if applicable? windows or linux
- What is the architecture (x64, x86, ARM, ARM64)? x64
- Do you know whether it is specific to that configuration? not specific
- Are you running in any particular type of environment? (e.g. Containers, a cloud scenario, app you are trying to target is a different user)
- Is it a self-contained published application? no
- What's the output of
dotnet info
.NET SDK:
Version: 7.0.100-preview.7.22377.5
Commit: ba310d9309
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.100-preview.7.22377.5\
Host:
Version: 7.0.0-preview.7.22375.6
Architecture: x64
Commit: eecb028078
.NET SDKs installed:
5.0.408 [C:\Program Files\dotnet\sdk]
6.0.302 [C:\Program Files\dotnet\sdk]
6.0.304 [C:\Program Files\dotnet\sdk]
7.0.100-preview.7.22377.5 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0-preview.7.22376.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0-preview.7.22375.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.0-preview.7.22377.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Regression?
Probably, sample responses in docs have traceId and spanId:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working