Skip to content

RUM-17613: timeseries [3/5] Pass the live RUM context to timeseries pipelines - #3717

Merged
satween merged 1 commit into
feature/timeseriesfrom
tvaleev/feature/RUM-17613-3-background-flush
Aug 17, 2026
Merged

RUM-17613: timeseries [3/5] Pass the live RUM context to timeseries pipelines#3717
satween merged 1 commit into
feature/timeseriesfrom
tvaleev/feature/RUM-17613-3-background-flush

Conversation

@satween

@satween satween commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Timeseries batches carried the RumContext captured when RumSessionScope created the collector, so every event was attributed to whatever view happened to be active at session start. The collector now tracks the context and hands it to Pipeline.execute() / Pipeline.flush() per call, and RumSessionScope feeds it the active context on every handled event.

Pipeline takes over its own synchronization as part of that: reader.read() stays outside the lock, so a concurrent flush() waits only for the buffer and never for /proc I/O.

The sampling lifecycle is unchanged here — background suspension still behaves exactly as before, gated on TimeseriesConfiguration.collectInBackground. [4/5] reworks it.

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)

Ref: RUM-17613

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 72.82% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 340e8c5 | Docs | Datadog PR Page | Give us feedback!

@codecov-commenter

codecov-commenter commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.37%. Comparing base (a31ef2f) to head (340e8c5).

Files with missing lines Patch % Lines
.../internal/timeseries/DefaultTimeseriesCollector.kt 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/timeseries    #3717      +/-   ##
======================================================
+ Coverage               73.34%   73.37%   +0.03%     
======================================================
  Files                    1012     1012              
  Lines                   37027    37029       +2     
  Branches                 6381     6380       -1     
======================================================
+ Hits                    27154    27167      +13     
+ Misses                   8046     8041       -5     
+ Partials                 1827     1821       -6     
Files with missing lines Coverage Δ
...droid/rum/internal/domain/scope/RumSessionScope.kt 93.26% <100.00%> (+0.04%) ⬆️
...al/timeseries/DefaultTimeseriesCollectorFactory.kt 100.00% <100.00%> (ø)
...atadog/android/rum/internal/timeseries/Pipeline.kt 96.88% <100.00%> (+0.10%) ⬆️
.../internal/timeseries/DefaultTimeseriesCollector.kt 76.00% <87.50%> (-1.55%) ⬇️

... and 43 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-17613-3-background-flush branch from 2c34b26 to 61448ac Compare August 14, 2026 15:04
@satween
satween marked this pull request as ready for review August 14, 2026 15:20
@satween
satween requested review from a team as code owners August 14, 2026 15:20
@satween satween changed the title RUM-17613: Stop collecting timeseries in background and flush the batch RUM-17613: Flush the batch in background Aug 14, 2026
@satween satween changed the title RUM-17613: Flush the batch in background RUM-17613: timeseries [3/4] Flush the batch in background Aug 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61448ace2d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@satween
satween force-pushed the tvaleev/feature/RUM-17613-3-background-flush branch from 61448ac to 341c6b1 Compare August 14, 2026 16:12
@satween satween changed the title RUM-17613: timeseries [3/4] Flush the batch in background RUM-17613: timeseries [3/5] Pass the live RUM context to timeseries pipelines Aug 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 341c6b1286

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@satween
satween force-pushed the tvaleev/feature/RUM-17613-3-background-flush branch from 341c6b1 to 56c1714 Compare August 17, 2026 08:55

satween commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@satween
satween force-pushed the tvaleev/feature/RUM-17613-3-background-flush branch from 56c1714 to 5e03b28 Compare August 17, 2026 09:27
@satween
satween force-pushed the tvaleev/feature/RUM-17613-3-background-flush branch from 5e03b28 to 41475c9 Compare August 17, 2026 10:45
Base automatically changed from tvaleev/feature/RUM-17613-2-timeseries-schema to feature/timeseries August 17, 2026 12:05
Timeseries batches carried the RumContext captured when RumSessionScope
created the collector, so every event was attributed to whatever view was
active at session start. The collector now tracks the context and hands it to
Pipeline.execute()/flush() per call, and RumSessionScope feeds it the active
context on each handled event.

Pipeline takes over its own synchronization as part of that: reader.read()
stays outside the lock so a concurrent flush() never waits for /proc I/O.

Ref: RUM-17613
@satween
satween force-pushed the tvaleev/feature/RUM-17613-3-background-flush branch from 41475c9 to 340e8c5 Compare August 17, 2026 12:05
@satween
satween merged commit 3b43c92 into feature/timeseries Aug 17, 2026
23 checks passed
@satween
satween deleted the tvaleev/feature/RUM-17613-3-background-flush branch August 17, 2026 12:46
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.

3 participants