Skip to content

RUM-17548: Document Android RUM view memory attributes - #38674

Open
jonathanmos wants to merge 1 commit into
masterfrom
jmoskovich/rum-17548/document-memory
Open

RUM-17548: Document Android RUM view memory attributes#38674
jonathanmos wants to merge 1 commit into
masterfrom
jmoskovich/rum-17548/document-memory

Conversation

@jonathanmos

@jonathanmos jonathanmos commented Aug 2, 2026

Copy link
Copy Markdown
Member

What does this PR do? What is the motivation?

Documents the Android RUM view.memory_average and view.memory_max attributes. This update explains what memory they measure, how the SDK calculates them, the default sampling frequency, configuration options, and collection limitations.

This information helps users interpret view memory data and account for sampling behavior when analyzing application performance.

Merge readiness

  • Ready for merge

AI assistance

Codex assisted PR.

@github-actions github-actions Bot added Architecture Everything related to the Doc backend cdocs labels Aug 2, 2026

@melamos melamos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for documenting this – seems like exactly what the support escalation needed. Added a few line-level suggestions: spell out JVM on first mention, and some minor wording tweaks to the memory_average/memory_max definitions and the per-view reset explanation for clarity.


#### View memory collection

The Android SDK reads the `VmRSS` value from `/proc/self/status`. This value measures resident memory for the entire application process. It includes native memory, the JVM or Android Runtime (ART) heap, and resident shared pages.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JVM isn't on the abbreviation exempt list and isn't spelled out elsewhere in this file — spell out on first mention.

Suggested change
The Android SDK reads the `VmRSS` value from `/proc/self/status`. This value measures resident memory for the entire application process. It includes native memory, the JVM or Android Runtime (ART) heap, and resident shared pages.
The Android SDK reads the `VmRSS` value from `/proc/self/status`. This value measures resident memory for the entire application process. It includes native memory, the Java Virtual Machine (JVM) or Android Runtime (ART) heap, and resident shared pages.

| `view.is_active` | Boolean | Indicates whether the view corresponding to this event is considered active. |
| `view.loading_time` | number (ns) | Time it took for the view to load, set by the `addViewLoadingTime(override:)` call. |
| `view.long_task.count` | number | Count of all long tasks collected for this view. |
| `view.memory_average` | number (bytes) | Exact arithmetic mean of successful process resident memory samples collected during this view. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `view.memory_average` | number (bytes) | Exact arithmetic mean of successful process resident memory samples collected during this view. |
| `view.memory_average` | number (bytes) | Exact arithmetic mean of successful whole-process resident memory samples collected while this view is foregrounded. |

| `view.loading_time` | number (ns) | Time it took for the view to load, set by the `addViewLoadingTime(override:)` call. |
| `view.long_task.count` | number | Count of all long tasks collected for this view. |
| `view.memory_average` | number (bytes) | Exact arithmetic mean of successful process resident memory samples collected during this view. |
| `view.memory_max` | number (bytes) | Largest successful process resident memory sample collected during this view. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `view.memory_max` | number (bytes) | Largest successful process resident memory sample collected during this view. |
| `view.memory_max` | number (bytes) | Largest successful whole-process resident memory sample collected while this view is foregrounded. |


The Android SDK reads the `VmRSS` value from `/proc/self/status`. This value measures resident memory for the entire application process. It includes native memory, the JVM or Android Runtime (ART) heap, and resident shared pages.

Each view tracks the exact running mean and maximum of successful samples. These calculations are neither exponential nor windowed. The SDK resets both calculations for each view.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each view tracks the exact running mean and maximum of successful samples. These calculations are neither exponential nor windowed. The SDK resets both calculations for each view.
Each view tracks the exact running mean and maximum of successful samples. Calculations reset when the view starts, so they reflect only the samples collected during that view, not a rolling average carried over from previous views.

@melamos melamos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving to unblock merge — see my earlier review for a few non-blocking wording suggestions.

@brett0000FF brett0000FF self-assigned this Aug 3, 2026

@brett0000FF brett0000FF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to Melissa's review comments. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Everything related to the Doc backend cdocs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants