sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

.NET Profiling for ASP.NET Core

Open bruno-garcia opened this issue 2 years ago • 4 comments

Follow up from:

  • https://github.com/getsentry/sentry-dotnet/issues/2315
  • https://github.com/getsentry/sentry-dotnet/issues/1955
  • [ ] collect Microsoft-Windows-DotNETRuntime rundown provider (loaded libs, etc) in a separate session and merge with actual samples later during processing, if possible (merging nettrace files, or having a custom provider for TraceLog).

  • [ ] Or maybe we don't even need to collect these because we're in the same process? can we hack our way around and get the libraries from the current process instead? Probably not so easy because it also somehow stack walking if I'm not mistaken.

  • [ ] We'll use GlobalMode to set the behavior: all threads in process (global Mode) or only activity/request (server mode)

  • [ ] Consider capturing only the current "activity", i.e. not all threads but only what belongs to the transaction.

  • See also https://studylib.net/doc/6851938/eventsource-activity-support

  • possible blocker https://github.com/microsoft/perfview/issues/2122

bruno-garcia avatar Apr 19 '23 20:04 bruno-garcia

Very exciting. How long do you think it'll be before external users are able to give it a go, assuming that we acknowledge that it's "alpha/beta caveat emptor" :)

ericsampson avatar May 07 '23 18:05 ericsampson

First we need to get through #2315, which is blocked by https://github.com/microsoft/perfview/issues/1829

Then we can better estimate this one. It will likely be a while.

mattjohnsonpint avatar May 09 '23 03:05 mattjohnsonpint

Blazor Wasm profiling available on .NET 10, I wonder if we can leverage that. Also:

  • https://github.com/getsentry/sentry-dotnet/issues/3523#issuecomment-2877930809

bruno-garcia avatar May 13 '25 21:05 bruno-garcia

Sentry releases Continuous Profiling support, with SDKs like Python and PHP.

Makes sense to update the ASPNET Core support to be on CP, since the current one is now called "UI Profiling" and doesn't really add a lot of value with so much Async code. Often just shows a few frames, or a bunch of async/await machinery and not much else

bruno-garcia avatar May 15 '25 13:05 bruno-garcia