Skip to content
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

dotnet-trace: no ActivityId from Linux #1461

Closed
mahamr opened this issue Aug 20, 2020 · 6 comments
Closed

dotnet-trace: no ActivityId from Linux #1461

mahamr opened this issue Aug 20, 2020 · 6 comments

Comments

@mahamr
Copy link

mahamr commented Aug 20, 2020

Hi Team,
When running dotnet-trace on Linux (Debian, .NET Core 3.1.7) against an ASP.NET Core app and pulling the traces to view in PerfView on Windows, there are no ActivityId fields in any events.

Notice no ActivityIds at the end of the lines:
image

When I run the same ANC app on Windows, using the same version of dotnet-trace with the same arguments, the output in PerfView contains ActivityIds:
image

dotnet-trace version info from Windows:

PS C:\Users\mahamr> dotnet-trace --version
3.1.137102+c62ab0fb98a60d9c889b3db47d2a4e56d5c69321

from Debian:

mahamr@debianstretch:~$ dotnet-trace --version
3.1.137102+c62ab0fb98a60d9c889b3db47d2a4e56d5c69321

dotnet --info from windows:

PS C:\Users\mahamr> dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.401
 Commit:    5b6f5e5005

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.1.401\

Host (useful for support):
  Version: 3.1.7
  Commit:  fcfdef8d6b

.NET Core SDKs installed:
  3.1.301 [C:\Program Files\dotnet\sdk]
  3.1.401 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

dotnet --info from Debian:

mahamr@debianstretch:~$ dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.1.302
 Commit:    41faccf259

Runtime Environment:
 OS Name:     debian
 OS Version:  9
 OS Platform: Linux
 RID:         debian.9-x64
 Base Path:   /usr/share/dotnet/sdk/3.1.302/

Host (useful for support):
  Version: 3.1.7
  Commit:  fcfdef8d6b

.NET Core SDKs installed:
  3.1.302 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.0.3 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Any thoughts here on why there's no ActivityId from Debian traces?

@sywhang
Copy link
Contributor

sywhang commented Aug 20, 2020

Hi @mahamr

What is the dotnet-trace command you're using to collect these traces?

@mahamr
Copy link
Author

mahamr commented Aug 20, 2020

Hi @sywhang,
Here's the command:
Debian:

dotnet-trace collect --profile cpu-sampling --providers Microsoft-Extensions-Logging:4:5,Microsoft-System-Net-Http::5,Microsoft-AspNetCore-Server-Kestrel::5 -p $(pidof ANC-Testing) -o pid$(pidof ANC-Testing)$(date +_%Y-%m-%d_%H%Mz).nettrace --format nettrace

Windows:

dotnet-trace collect -p 13460 --profile cpu-sampling --providers Microsoft-Extensions-Logging:4:5,Microsoft-AspNetCore-Server-Kestrel,Microsoft-System-Net-Http::5 -o c:\temp\13460-windows.nettrace

@mahamr
Copy link
Author

mahamr commented Sep 1, 2020

Hi @sywhang,
Just out of curiosity, how's this investigation going? Have you been able to reproduce the same issue?
Thank you!

@sywhang
Copy link
Contributor

sywhang commented Sep 1, 2020

Hi @MAHMR,

Sorry for the delayed response and thanks for reminding me. I was able to repro the issue locally, and I believe the issue is related to an issue we addressed in .NET 5: dotnet/runtime#37945. The issue was fixed via dotnet/runtime#38313.

I wasn't able to repro the issue any more in .NET 5, but if it still repros on your end, it would be nice if you could provide a minimal repro that I can use to repro the issue.

@mahamr
Copy link
Author

mahamr commented Sep 2, 2020

Hi @sywhang,
Thanks for the update! I'll give this a test tomorrow and let you know how it goes.

@noahfalk
Copy link
Member

noahfalk commented Nov 6, 2020

Issue appears likely resolved, we can reopen if we hear otherwise.

@noahfalk noahfalk closed this as completed Nov 6, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jun 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants