Skip to content

Proposal: Memory allocation measurement on traces to detect bloat/leaks #2786

Open
@johnnyshields

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:

image

And here's the dramatic result of implementing a single fix on one endpoint discovered using this tool:
image

Any interest to make a spec for memory related concerns?

Metadata

Assignees

No one assigned

    Labels

    needs discussionNeed more information before all suitable labels can be appliedsig-issueA specific SIG should look into this before discussing at the spec

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions