-
-
Notifications
You must be signed in to change notification settings - Fork 223
feat: Profiling #2206
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
feat: Profiling #2206
Conversation
|
47b99ff
to
62aafa9
Compare
samples/Sentry.Samples.AspNetCore.Mvc/Sentry.Samples.AspNetCore.Mvc.csproj
Outdated
Show resolved
Hide resolved
514c623
to
a7911d2
Compare
Outcome of a chat between @vaind and I:
|
samples/Sentry.Samples.Console.Profiling/Sentry.Samples.Console.Profiling.csproj
Outdated
Show resolved
Hide resolved
samples/Sentry.Samples.Console.Profiling/Sentry.Samples.Console.Profiling.csproj
Outdated
Show resolved
Hide resolved
Looks like something in the latest changes broke things. Everything else looks good, so after resolving that all that's needed is the license file and and then I will approve. Thanks!!! |
Co-authored-by: Matt Johnson-Pint <[email protected]>
Oh, and a changelog entry also. Let's go with "Initial work to support profiling in a future release." - since we're not making it available just yet. And we should also add a |
Merged. Thanks!!! |
JFYI MonoVM does have the identical sampling profiler mechanism. |
Part of #1955
This uses Diagnostic IPC to connect to the CLR in-process, capture
Microsoft-DotNETCore-SampleProfiler
trace events and transforms them to the format Sentry understands.In its current state, the feature is in a good shape for alfa testing but there's a major followup to resolve and that is how
TraceLog
, which is a tool to process raw events and get figure out stack traces, works, i.e. that it requires files and needs to be saved & then loaded from file to be actually usable (see here). I'm starting to lean towards a fork/copy of relevant parts where we gut it to get what we need and drop the rest. That way we could also do without the rundown provider that gives as all past .net runtime events when we start a profile. Functionally (from the user perspective), the profile should look the same, but the implementation should be more efficient than it is now, especially the processing that happens after the profiling stops and also it would be most noticeable for short transactions if we could avoid requesting all past CLR runtime events (for simple app, it's about 3 MB of data).TODOs
Followups
maybe filter-out threads that don't run any user code?marked as in-app=falseshould we filter-out sentry-specific/profiling-specific samples?marked as in-app=falsedebug_meta
images if we want to show line numbers - this may need to be opt-in as it will likely add some runtime overhead_session.EventStream
before even transforming to ETLX.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).