Skip to content

RUM-16113: Prevent inactive views from overwriting last_view_event - #3707

Open
ambushwork wants to merge 1 commit into
developfrom
yl/RUM-16113-fix-last-view-event-overwrite
Open

RUM-16113: Prevent inactive views from overwriting last_view_event#3707
ambushwork wants to merge 1 commit into
developfrom
yl/RUM-16113-fix-last-view-event-overwrite

Conversation

@ambushwork

@ambushwork ambushwork commented Aug 12, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Prevents view events of views that are no longer displayed from overwriting last_view_event.
last_view_event is the snapshot crash handlers (NDK, ANR, late crash reporting) read to attribute a crash to a RUM view.
RumDataWriter.onDataWritten used to overwrite it on every ViewEvent, so an event emitted by an already-replaced view became the crash attribution target.

RumDataWriter now resolves the current view from the RUM feature context and persists the event only if it belongs to that view, or to a view that started late.

Motivation

RUM-16113

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)

@ambushwork

Copy link
Copy Markdown
Member Author

@codex review

@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: 0dd2b745f1

ℹ️ 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".

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Aug 12, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🔄 Datadog retried 2 tests - 2 passed on retry View in Datadog

🎯 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: 4ea458e | Docs | Datadog PR Page | Give us feedback!

@codecov-commenter

codecov-commenter commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.15%. Comparing base (69bfb31) to head (4ea458e).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3707      +/-   ##
===========================================
- Coverage    73.16%   73.15%   -0.01%     
===========================================
  Files         1000     1000              
  Lines        36598    36605       +7     
  Branches      6327     6330       +3     
===========================================
+ Hits         26774    26777       +3     
  Misses        8024     8024              
- Partials      1800     1804       +4     
Files with missing lines Coverage Δ
...tadog/android/rum/internal/domain/RumDataWriter.kt 89.58% <100.00%> (+1.78%) ⬆️

... and 30 files with indirect coverage changes

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

@ambushwork
ambushwork force-pushed the yl/RUM-16113-fix-last-view-event-overwrite branch 7 times, most recently from e2f0626 to 757a422 Compare August 12, 2026 15:31
@ambushwork
ambushwork marked this pull request as ready for review August 13, 2026 06:53
@ambushwork
ambushwork requested review from a team as code owners August 13, 2026 06:53

@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: 757a422e49

ℹ️ 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".

@sbarrio
sbarrio requested a review from satween August 13, 2026 07:05
@ambushwork
ambushwork marked this pull request as draft August 13, 2026 07:27
@ambushwork
ambushwork force-pushed the yl/RUM-16113-fix-last-view-event-overwrite branch from 757a422 to 3d5dac9 Compare August 13, 2026 07:36
@ambushwork

Copy link
Copy Markdown
Member Author

@codex review

@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: 3d5dac96cc

ℹ️ 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".

@ambushwork
ambushwork force-pushed the yl/RUM-16113-fix-last-view-event-overwrite branch from 3d5dac9 to 37a0cee Compare August 13, 2026 08:10
@ambushwork

Copy link
Copy Markdown
Member Author

@codex review

@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: 37a0ceee2a

ℹ️ 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".

@ambushwork
ambushwork force-pushed the yl/RUM-16113-fix-last-view-event-overwrite branch from 37a0cee to c22ced7 Compare August 13, 2026 09:24
@ambushwork

Copy link
Copy Markdown
Member Author

@codex review

@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: c22ced7adc

ℹ️ 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".

@ambushwork
ambushwork marked this pull request as ready for review August 13, 2026 12:26

@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: c22ced7adc

ℹ️ 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".

@ambushwork
ambushwork force-pushed the yl/RUM-16113-fix-last-view-event-overwrite branch from c22ced7 to 4ea458e Compare August 13, 2026 12:54

@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: 4ea458ef7f

ℹ️ 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 self-requested a review August 14, 2026 10:07
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