Proposal: Memory allocation measurement on traces to detect bloat/leaks #2786
Description
VM interpreted languages like Ruby, Python, etc. have a heap memory allocator / garbage collector (GC) which can be subject to memory bloat (spikes where lots of memory is suddenly allocated) and memory leaks (gradual accumulation of non-GC'ed objects over time. These can lead to critical problems such as paging-related slowness (primarily a symptom of with bloat) and out-of-memory process kills (primarily a symptom of with leaks).
This blog post has good explanation from Ruby perspective.
OTEL does a great job in analyzing latency/queries/rendering, however, that's often only part of the story especially in complex apps. It would be very useful to be able to look at object memory allocations on each app endpoint.
Here's an example of what Scout APM can do for Ruby/Rails to measure memory. Note that this measurement is done on each trace:
And here's the dramatic result of implementing a single fix on one endpoint discovered using this tool:
Any interest to make a spec for memory related concerns?