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

.NET Profiling for client apps (Desktop/CLI/Mobile) #2315

Open
2 of 12 tasks
bruno-garcia opened this issue Apr 19, 2023 · 3 comments
Open
2 of 12 tasks

.NET Profiling for client apps (Desktop/CLI/Mobile) #2315

bruno-garcia opened this issue Apr 19, 2023 · 3 comments
Assignees
Labels
Feature New feature or request Product: Profiling

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Apr 19, 2023

Follow up from: #1955

Goals:

Followups from: #2206

Some notes:

  • We should support the lowest .NET version possible but for as long as we have no friction to do so. If supporting .NET 6 is the simplest/what we get OOTB, we should take that route. It's a new feature and we expect new customers/those upgrading to take advantage of. in other words: No .NET Framework or unsupported .NET Core as a goal.
  • mark threads that don't run any user code as in-app=false
  • should we filter-out sentry-specific/profiling-specific samples? marked as in-app=false
  • provide debug_meta images if we want to show line numbers - this may need to be opt-in as it will likely add some runtime overhead
  • it may be possible to handle GCstart & GCend events to show garbage collection
  • Figure out thread names (we only have native thread IDs though so it seems to be a problem)
  • Mobile/MAUI is a stretch goal (see: filipnavara/maui-sentry-profile)
@vaind
Copy link
Collaborator

vaind commented Apr 26, 2023

Performance findings

I've done some benchmarks from various angles and what I've found (full results in this file) is:

  • there's a fixed synchronous overhead at sampling-profiler start - on my machine, it's about 110 ms
  • the overhead of profiling itself on a single-thread workload is about 4 %

The start-profiling overhead is unacceptable in all but very long transactions. Therefore, to make this GA, we would likely need to collect the profile continuously and slice it when a transaction runs, instead of starting to profile for each transaction.

@bruno-garcia
Copy link
Member Author

microsoft/perfview#1867

@bruno-garcia bruno-garcia changed the title .NET Profiling for client apps (desktop/CLI) .NET Profiling for client apps (Desktop/CLI/Mobile) Nov 27, 2023
@bruno-garcia
Copy link
Member Author

Filip Navara got it working on MAUI with: https://github.com/filipnavara/maui-sentry-profile/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Product: Profiling
Projects
Status: No status
Archived in project
Development

No branches or pull requests

4 participants