sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Start reporting memory usage for python in traces/profiles

Open sky-code opened this issue 1 year ago • 2 comments

Problem Statement

Sentry provides good overview of time consumption in Trace View, for some projects/situations it very useful to have the same overview for memory usage.

For example in our use case we are doing files parsing and processing, they are very unpredictable in size/structure and may vary significantly, it is hard for us to identify what files and which one processing operation uses most memory and exact numbers.

Sentry reports memory usage for some platforms but does not for python, at the same time other observability tools support memory usage tracing, for example datadog and scout-apm but it's inconvenient to use couple APM tools for different types of metrics.

See also https://github.com/getsentry/sentry/discussions/49178

Solution Brainstorm

Make it as optional feature, capture process rss memory, show in profiler/trace view and add option in UI to switch between time and memory view. Something like that Image

Similar to SQL+1 detection, potential memory leaks / huge spikes can be detected and reported.

See also https://scoutapm.com/docs/features#memory-bloat-detection for inspiration.

Product Area

Profiling

sky-code avatar Oct 02 '24 04:10 sky-code

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar Oct 02 '24 04:10 getsantry[bot]

Routing to @getsentry/product-owners-performance for triage ⏲️

getsantry[bot] avatar Oct 02 '24 21:10 getsantry[bot]

Routing to @getsentry/product-owners-profiling for triage ⏲️

getsantry[bot] avatar Oct 09 '24 14:10 getsantry[bot]

Routing to @getsentry/product-owners-performance for triage ⏲️

getsantry[bot] avatar Oct 09 '24 14:10 getsantry[bot]

Thanks for the feature request @sky-code, I've added to one of our backlogs.

bcoe avatar Oct 09 '24 14:10 bcoe

Same use case for us. Any expectations of this being done in the future? Thanks

felipe-canopy avatar May 02 '25 22:05 felipe-canopy

Same use case for us.

@felipe-canopy hear you loud and clear, this is an interesting use case and something that we have on our minds.

Any expectations of this being done in the future?

To manage expectations, this isn't work we have planned in the immediate future. But hearing from people expressing interest helps with prioritization.

bcoe avatar May 05 '25 18:05 bcoe