Skip to content

RUMS-5535: Fix global attributes not copied when view stops#3177

Merged
ambushwork merged 1 commit into
developfrom
yl/fix-global-attributes-missing-in-view
Feb 17, 2026
Merged

RUMS-5535: Fix global attributes not copied when view stops#3177
ambushwork merged 1 commit into
developfrom
yl/fix-global-attributes-missing-in-view

Conversation

@ambushwork

@ambushwork ambushwork commented Feb 12, 2026

Copy link
Copy Markdown
Member

Current Issue

When customers call GlobalRumMonitor.get().addAttribute(attribute.key, attribute.value), they expect to see the custom attributes in all the following views, actions, resources and errors. There is an issue reported by a customer that the global attributes are missing in most of the views in the sessions, while they are available in all the actions, resources or errors.

Cause

When a view is stopped, it is expected to copy the snapshot of custom attributes of the parent scope at the moment it stops, which is the case when customer calls stop view manually, but not the case if stop view is triggered by StartView of the new view. Thus, when sendViewUpdate is triggered by stopView like this, it is updated without the global attributes.

Fix

apply the same snapshot copy logic into stop view when it's triggered by a new start view.

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)

@datadog-official

This comment has been minimized.

@codecov-commenter

codecov-commenter commented Feb 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.23%. Comparing base (369ea6c) to head (c14d6ec).
⚠️ Report is 6 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3177      +/-   ##
===========================================
+ Coverage    71.20%   71.23%   +0.03%     
===========================================
  Files          922      922              
  Lines        34099    34100       +1     
  Branches      5776     5776              
===========================================
+ Hits         24277    24289      +12     
+ Misses        8190     8175      -15     
- Partials      1632     1636       +4     
Files with missing lines Coverage Δ
.../android/rum/internal/domain/scope/RumViewScope.kt 93.82% <100.00%> (-0.41%) ⬇️

... and 34 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/fix-global-attributes-missing-in-view branch from fc57f4e to 6acd907 Compare February 13, 2026 12:16
@ambushwork ambushwork changed the title Fix global attributes not copied when view stops RUMS-5535: Fix global attributes not copied when view stops Feb 13, 2026
@ambushwork
ambushwork marked this pull request as ready for review February 13, 2026 12:20
@ambushwork
ambushwork requested a review from a team as a code owner February 13, 2026 12:20
@ambushwork

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

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

kikoveiga
kikoveiga previously approved these changes Feb 13, 2026
@ambushwork
ambushwork force-pushed the yl/fix-global-attributes-missing-in-view branch from 6acd907 to c14d6ec Compare February 17, 2026 09:48
@ambushwork
ambushwork merged commit 4711ad8 into develop Feb 17, 2026
26 checks passed
@ambushwork
ambushwork deleted the yl/fix-global-attributes-missing-in-view branch February 17, 2026 12:58
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.

5 participants