Skip to content

timeseries RUM-13949 Add memory timeseries serializer and session factory#3434

Draft
satween wants to merge 3 commits into
tvaleev/feature/RUM-13949/timeseries-cpu-supportfrom
tvaleev/feature/RUM-13949/timeseries-memory-session-factory
Draft

timeseries RUM-13949 Add memory timeseries serializer and session factory#3434
satween wants to merge 3 commits into
tvaleev/feature/RUM-13949/timeseries-cpu-supportfrom
tvaleev/feature/RUM-13949/timeseries-memory-session-factory

Conversation

@satween
Copy link
Copy Markdown
Contributor

@satween satween commented May 12, 2026

What does this PR do?

Adds MemoryEventSerializer, which converts a batch of memory DataPoints (heap + native RSS) into a RumTimeseriesMemoryEvent JSON object. Introduces TimeseriesConfiguration as the public @ExperimentalRumApi configuration class (sampling intervals, batch size, background collection flag). Completes the pipeline with RumSessionScopeTimeseriesFactory, which wires CPU and memory readers, serializers, and the TimeseriesConfiguration together to create fully configured RumSessionScopeTimeseries instances for each new session.

Motivation

Completes the two metric types and provides the factory needed to tie the pipeline to the RUM session lifecycle.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

Copy link
Copy Markdown
Contributor Author

satween commented May 12, 2026

@satween satween changed the title RUM-13949 Add memory timeseries serializer and session factory timeseries RUM-13949 Add memory timeseries serializer and session factory May 12, 2026
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch from 1632f2f to cdcacee Compare May 13, 2026 13:43
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-cpu-support branch from 4406481 to 3c4b02d Compare May 13, 2026 13:43
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch from cdcacee to 9c62b82 Compare May 13, 2026 14:44
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-cpu-support branch from 3c4b02d to 98b83f2 Compare May 13, 2026 14:44
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 13, 2026

Codecov Report

❌ Patch coverage is 95.38462% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.22%. Comparing base (75b5891) to head (4c08c9b).

Files with missing lines Patch % Lines
...nal/timeseries/serializer/MemoryEventSerializer.kt 96.30% 0 Missing and 2 partials ⚠️
.../android/rum/timeseries/TimeseriesConfiguration.kt 90.91% 1 Missing ⚠️
Additional details and impacted files
@@                                 Coverage Diff                                  @@
##           tvaleev/feature/RUM-13949/timeseries-cpu-support    #3434      +/-   ##
====================================================================================
+ Coverage                                             72.11%   72.22%   +0.11%     
====================================================================================
  Files                                                   971      973       +2     
  Lines                                                 35588    35653      +65     
  Branches                                               5920     5929       +9     
====================================================================================
+ Hits                                                  25664    25749      +85     
+ Misses                                                 8286     8280       -6     
+ Partials                                               1638     1624      -14     
Files with missing lines Coverage Δ
.../android/rum/timeseries/TimeseriesConfiguration.kt 90.91% <90.91%> (ø)
...nal/timeseries/serializer/MemoryEventSerializer.kt 96.30% <96.30%> (ø)

... and 38 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch from 9c62b82 to 509d75e Compare May 14, 2026 19:40
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-cpu-support branch from 98b83f2 to 118d5ec Compare May 14, 2026 19:40
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch from 509d75e to db0263b Compare May 20, 2026 15:27
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-cpu-support branch from 118d5ec to 431b419 Compare May 20, 2026 15:27
@datadog-prod-us1-5

This comment has been minimized.

@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-cpu-support branch from 431b419 to 2b03f75 Compare May 21, 2026 19:23
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch 2 times, most recently from ec3a571 to 62b2166 Compare May 21, 2026 20:16
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-cpu-support branch from 2b03f75 to 5e8be62 Compare May 21, 2026 20:16
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch from 62b2166 to 4ee1870 Compare May 22, 2026 13:01
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-cpu-support branch from 5e8be62 to 558a3fa Compare May 22, 2026 13:01
satween and others added 3 commits May 22, 2026 14:53
Adds `MemoryEventSerializer`, which converts a batch of memory `DataPoint`s (heap + native RSS) into a `RumTimeseriesMemoryEvent` JSON object. Introduces `TimeseriesConfiguration` as the public `@ExperimentalRumApi` configuration class (sampling intervals, batch size, background collection flag). Completes the pipeline with `RumSessionScopeTimeseriesFactory`, which wires CPU and memory readers, serializers, and the `TimeseriesConfiguration` together to create fully configured `RumSessionScopeTimeseries` instances for each new session.

Completes the two metric types and provides the factory needed to tie the pipeline to the RUM session lifecycle.

`MemoryEventSerializer` reports both heap and native RSS in bytes, normalised to a 0–100 percent scale using device `maxMemory`. `RumSessionScopeTimeseriesFactory` creates one pipeline per metric type and dispatches them through the same `Timeseries.Factory` interface. `TimeseriesConfiguration` exposes sampling interval, batch size, and a background-collection flag with sensible defaults.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch from 4ee1870 to 4c08c9b Compare May 22, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants