Description
Feature Request
Describe the solution you'd like
For a selected subset of traces, I'd like to able to capture additional details related to execution (e.g. stack samples) that would give me a deeper visibility, allowing me to better understand the flow of execution and identify potential performance bottlenecks.
Context
Auto-instrumentation already supports continuous profiling which captures stack samples for all of the managed threads.
The expectation of that kind of profiling is to collect samples every few seconds (e.g. every 1s
or 10s
).
In order to support additional, trace-centric scenarios listed above, auto-instrumentation would need to support collecting samples at a much higher rate (e.g. order of 10s of ms
).
Additionally, there should be a way to dynamically start and stop sampling given thread (so that, in case of e.g. async operations, frequent sampling is started on a thread where execution started, and then stopped when e.g. continuation is scheduled, and then started again on a thread where continuation runs).
This also requires an ability to track changes of execution context.
Fortunately, such changes are already tracked by continuous profiling related code, in order to track span context-thread association, so similar approach could be used.
Plugins should be given an option to opt-in for this behavior (and configure frequent sampling frequency, exporter for captured samples etc., similar to current continuous profiling configuration).
No overhead should be incurred when feature is not enabled (which should be a default).
Native-side code for continuous profiler could be reused to capture stack samples. Currently, symbols resolving is done when runtime is suspended - in order to minimize suspension time, this could be moved outside of suspension.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status