Skip to content

timeseries [5/6] RUM-13949 Wire timeseries collection into RUM session lifecycle#3435

Draft
satween wants to merge 4 commits into
tvaleev/feature/RUM-13949/timeseries-memory-session-factoryfrom
tvaleev/feature/RUM-13949/timeseries-rum-session-wiring
Draft

timeseries [5/6] RUM-13949 Wire timeseries collection into RUM session lifecycle#3435
satween wants to merge 4 commits into
tvaleev/feature/RUM-13949/timeseries-memory-session-factoryfrom
tvaleev/feature/RUM-13949/timeseries-rum-session-wiring

Conversation

@satween
Copy link
Copy Markdown
Contributor

@satween satween commented May 12, 2026

What does this PR do?

Adds enableTimeseries()/disableTimeseries() builder methods on RumConfiguration.Builder. Wires the Timeseries.Factory through RumFeatureDatadogRumMonitorRumApplicationScopeRumSessionScope, so that a new RumSessionScopeTimeseries collector is created and started for each sampled session and stopped on session end or SDK teardown. Also enables timeseries in the Kotlin sample app.

Motivation

Connects the standalone pipeline and public configuration API to the existing RUM session lifecycle, completing the end-to-end data flow from configuration through to event emission.

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 Wire timeseries collection into RUM session lifecycle timeseries RUM-13949 Wire timeseries collection into RUM session lifecycle May 12, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 12, 2026

Codecov Report

❌ Patch coverage is 51.85185% with 39 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (tvaleev/feature/RUM-13949/timeseries-memory-session-factory@acebd04). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...lin/com/datadog/android/rum/internal/RumFeature.kt 38.60% 35 Missing ⚠️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 50.00% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                      Coverage Diff                                       @@
##             tvaleev/feature/RUM-13949/timeseries-memory-session-factory    #3435   +/-   ##
==============================================================================================
  Coverage                                                               ?   72.30%           
==============================================================================================
  Files                                                                  ?      976           
  Lines                                                                  ?    35873           
  Branches                                                               ?     5973           
==============================================================================================
  Hits                                                                   ?    25936           
  Misses                                                                 ?     8306           
  Partials                                                               ?     1631           
Files with missing lines Coverage Δ
...rum/src/main/kotlin/com/datadog/android/rum/Rum.kt 86.25% <100.00%> (ø)
...kotlin/com/datadog/android/rum/RumConfiguration.kt 92.71% <100.00%> (ø)
...d/rum/internal/domain/scope/RumApplicationScope.kt 95.35% <100.00%> (ø)
...droid/rum/internal/domain/scope/RumSessionScope.kt 91.81% <ø> (ø)
.../android/rum/internal/monitor/DatadogRumMonitor.kt 86.17% <50.00%> (ø)
...lin/com/datadog/android/rum/internal/RumFeature.kt 84.89% <38.60%> (ø)
🚀 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 1632f2f to cdcacee Compare May 13, 2026 13:43
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-rum-session-wiring branch from f630b6d to 3b05b0c 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-rum-session-wiring branch from 3b05b0c to 9d01d39 Compare May 13, 2026 14:44
@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-rum-session-wiring branch from 9d01d39 to 8ea9614 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-rum-session-wiring branch from 8ea9614 to 9a49aaa 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-memory-session-factory branch from db0263b to ec3a571 Compare May 21, 2026 19:25
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-rum-session-wiring branch 2 times, most recently from 0db4915 to 91bf158 Compare May 21, 2026 20:16
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch from ec3a571 to 62b2166 Compare May 21, 2026 20:16
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-rum-session-wiring branch from 91bf158 to 7298723 Compare May 22, 2026 13:01
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-memory-session-factory branch 2 times, most recently from 4ee1870 to 4c08c9b Compare May 22, 2026 14:52
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-rum-session-wiring branch from 7298723 to cd319d9 Compare May 22, 2026 14:52
@satween satween changed the title timeseries RUM-13949 Wire timeseries collection into RUM session lifecycle timeseries [5/6] RUM-13949 Wire timeseries collection into RUM session lifecycle May 25, 2026
satween and others added 4 commits May 27, 2026 10:58
Adds `enableTimeseries()`/`disableTimeseries()` builder methods on `RumConfiguration.Builder`. Wires the `Timeseries.Factory` through `RumFeature` → `DatadogRumMonitor` → `RumApplicationScope` → `RumSessionScope`, so that a new `RumSessionScopeTimeseries` collector is created and started for each sampled session and stopped on session end or SDK teardown. Also enables timeseries in the Kotlin sample app.

Connects the standalone pipeline and public configuration API to the existing RUM session lifecycle, completing the end-to-end data flow from configuration through to event emission.

Existing scope and monitor test scaffolding is updated to pass `timeseriesFactory = null` / a mock factory where required. The `RumFeature.onStop()` ordering test verifies the writer is still live when the final flush fires.
…ctivityManager cast

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
MemoryInfo() and getMemoryInfo() are listed in knownThrowingCalls
as they can throw RuntimeException on broken Android implementations.
Extract to readTotalRamBytes() with a safe RuntimeException catch
and WARN log, falling back to 0.

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 4c08c9b to acebd04 Compare May 27, 2026 09:59
@satween satween force-pushed the tvaleev/feature/RUM-13949/timeseries-rum-session-wiring branch from cd319d9 to ac48ae9 Compare May 27, 2026 09:59
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